perl-DBIx-ThinSQL-SQLite - add various functions to SQLite

Property Value
Distribution ALT Linux Sisyphus
Repository Autoimports noarch
Package filename perl-DBIx-ThinSQL-SQLite-0.0.17-alt1.noarch.rpm
Package name perl-DBIx-ThinSQL-SQLite
Package version 0.0.17
Package release alt1
Package architecture noarch
Package type rpm
Category Development/Perl
Homepage -
License -
Maintainer -
Download size 19.40 KB
Installed size 19.40 KB
DBIx::ThinSQL::SQLite adds various functions to the SQL syntax
understood by SQLite, using the *sqlite_create_function()* and
*sqlite_create_aggregate_function()* methods of the DBD::SQLite manpage. It
also adds sequence methods to the DBIx::ThinSQL manpage database handles.
The following functions are exported on request:
=item create_sqlite_sequence( $dbh )
Ensure that the `sqlite_sequence' table exists.  This function must be
called on the database (once only - the changes are permanent) before
any of the other sequence related functions or methods will work.
This function works by creating (and dropping) a table with an
`INTEGER PRIMARY KEY AUTOINCREMENT' definition. If you are using the
sequence support from this module you probably don't want to be
creating your own tables with the autoincrement feature, as it may
clash with this module.
=item create_functions( $dbh, @functions )
Add `@functions' to the SQL understood by SQLite for the database
handle `$dbh'. `@functions' can be any combination of the following:
=item debug( @items )
This function called from SQL context logs `@items' with a `debug()'
call to a the Log::Any manpage instance.  If the first item of `@items' begins
with `/^select/i' then that statement will be run and the result
logged using `log_debug' from the DBIx::ThinSQL manpage instead.
=item create_sequence( $name )
Create a sequence in the database with name $name.
=item nextval( $name ) -> Int
Advance the sequence to its next value and return that value.
=item currval( $name ) -> Int
Return the current value of the sequence.
If the Digest::SHA manpage is installed then the following functions can also be
=item sha1( $expr, ... ) -> bytes
Calculate the SHA digest of `$expr' and return it in a 20-byte binary
form. Unfortunately it seems that the underlying SQLite C
sqlite_create_function() provides no way to identify the result as a
blob, so you must always manually cast the result in SQL like so:
=item sha1_hex( $expr, ... ) -> hexidecimal
Calculate the SQLite digest of `$expr' and return it in a 40-character
hexidecimal form.
=item sha1_base64( $expr, ... ) -> base64
Calculate the SQLite digest of `$expr' and return it in a base64
encoded form.
=item agg_sha1( $expr, $sort_expr ) -> bytes
=item agg_sha1_hex( $expr, $sort_expr ) -> hexidecimal
=item agg_sha1_base64( $expr, $sort_expr ) -> base64
These aggregate functions are for use with statements using GROUP BY.
`$expr' is the expression on which to calculate the SHA1 hash, and
`$sort_expr' determines the (string) comparison order in which
`$expr' is fed to the SHA1 stream.
Note that user-defined SQLite functions are only valid for the current
session.  They must be created each time you connect to the database.
You can have this happen automatically at connect time by taking
advantage of the the DBI manpage `Callbacks' attribute:
my $db = DBI::ThinSQL->connect(
$dsn, undef, undef,
Callbacks => {
connected => sub {
my $dbh = shift;
create_functions( $dbh,
qw/debug nextval/ );
=item create_methods( @methods )
Add `@methods' to the DBIx::ThinSQL::db class which can be any
combination of the following:
=item create_sequence( $name )
Create a sequence in the database with name $name.
=item nextval( $name ) -> Int
Advance the sequence to its next value and return that value.
=item currval( $name ) -> Int
Return the current value of the sequence.
These methods are added to a Perl class and are therefore available to
any the DBIx::ThinSQL manpage handle.


Package Version Architecture Repository
perl-DBIx-ThinSQL-SQLite - - -


Name Value
/usr/share/perl5 -
perl(Digest/ -
perl(Exporter/ -
perl(Log/ -
perl-base >= 1:5.10.0
rpmlib(PayloadIsLzma) -


Name Value
perl(DBIx/ThinSQL/ = 0.0.017
perl-DBIx-ThinSQL-SQLite = 0.0.17-alt1


Type URL
Binary Package perl-DBIx-ThinSQL-SQLite-0.0.17-alt1.noarch.rpm
Source Package perl-DBIx-ThinSQL-SQLite-0.0.17-alt1.src.rpm

Install Howto

  1. Add the following line to /etc/apt/sources.list:
    rpm [Sisyphus] noarch autoimports
    rpm [Sisyphus] noarch autoimports
  2. Update the package index:
    # sudo apt-get update
  3. Install perl-DBIx-ThinSQL-SQLite rpm package:
    # sudo apt-get install perl-DBIx-ThinSQL-SQLite



See Also

Package Description
perl-DBIx-Threaded-0.10-alt1.noarch.rpm Proxy class to permit DBI objects to be
perl-DBIx-Timeout-1.01-alt1.noarch.rpm provides safe timeouts for DBI calls
perl-DBIx-Tracer-0.03-alt1.noarch.rpm Easy tracer for DBI
perl-DBIx-Transaction-1.100-alt1.noarch.rpm perl module DBIx-Transaction
perl-DBIx-TransactionManager-1.13-alt1.noarch.rpm Transaction handling for database
perl-DBIx-TransactionManager-Distributed-0.02-alt1.noarch.rpm it will not be used for any further transaction requests via L</txn>
perl-DBIx-TransactionManager-EndHook-0.02-alt1.noarch.rpm hook of DBIx::TransactionManager commit
perl-DBIx-TransactionManager-Extended-0.03-alt1.noarch.rpm extended DBIx::TransactionManager
perl-DBIx-Tree-1.97-alt1.noarch.rpm Generate a tree from a self-referential database table
perl-DBIx-Tree-MaterializedPath-0.06-alt1.noarch.rpm fast DBI queries and updates on "materialized path" trees
perl-DBIx-Tree-NestedSet-0.16-alt1.noarch.rpm >connect('DBI:mysql:test','user','pass') or die ($DBI::errstr);
perl-DBIx-Tree-Persist-1.04-alt1.noarch.rpm Play with Tree and Tree::Persist a la DBIx::Tree
perl-DBIx-TryAgain-0.05-alt1.noarch.rpm If at first you don't succeed, try, try again
perl-DBIx-TxnPool-0.12-alt1.noarch.rpm The helper for making SQL insert/delete/update statements through a transaction method with a deadl
perl-DBIx-Version-0.01-alt1.noarch.rpm Perl extension for getting database software name and version