NAME

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

VERSION

0.0.4 (2013-06-11) Development release.

SYNOPSIS

use DBIx::ThinSQL;
use DBIx::ThinSQL::SQLite
    qw/create_functions
       create_methods
       create_sqlite_sequence/;

my $db = DBIx::ThinSQL->connect('dbi:SQLite:dbname=...');

# Call once only to initialize permanently
create_sqlite_sequence($db);

# Call after every connect to the database
create_functions( $db, qw/ debug create_sequence currval / );

# Call once every program run
create_methods(qw/create_sequence nextval/);

# Then use SQL functions or Perl methods as required
$db->do(q{ SELECT debug('logged via Log::Any->debug'); });
$db->do(q{ SELECT create_sequence('name'); });
$db->do(q{ SELECT nextval('name'); });
$db->create_sequence('othername');
$db->nextval('othername');

DESCRIPTION

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 DBD::SQLite. It also adds sequence methods to DBIx::ThinSQL database handles.

The following functions are exported on request:

SEE ALSO

Log::Any

AUTHOR

Mark Lawrence nomad@null.net

COPYRIGHT AND LICENSE

Copyright (C) 2013 Mark Lawrence nomad@null.net

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.