NAME
SQLite::DB provides an object oriented wrapper to SQLite databases using DBI and DBD::SQLite modules.
SYNOPSIS
use SQLite::DB;
my $db = SQLite::DB->new('file');
$db->connect;
$db->select("select * from table where field = value") || print $db->get_error."\n";
$db->select("select * from table where field = ?","value") || print $db->get_error."\n";
$db->select("select * from table where field = ?","value") || print $db->get_error."\n";
$result = $db->select_one_row("select max(field) as total FROM table");
print $$result{TOTAL};
$db->transaction_mode;
$db->exec("INSERT (a,b,c) VALUES 'a','b','c'");
$db->exec("INSERT (a,b,c) VALUES ?,?,?",'a','b','c');
$db->exec("update table set field = value") || print $db->get_error."\n";
$db->commit || print $db->get_error."\n";
$db->rollback || print $db->get_error."\n";
my $resultset = $db->get_dblist("select * from table","display_field","keyfield");
if (!ref $resultset) {
print $db->get_error."\n"
} else {
for (@$resultset) {
print $resultset->[$_]->{id}." - ".$resultset->[$_]->{value}."\n";
}
}
$db->disconnect;
DESCRIPTION
The goal is provide simple coding style to interact with SQLite databases.
Functions
new(path to db file)
Constructor.
EXPORT_OK
w2n
KNOWN BUGS
None.
AUTHOR
Vitor Serra Mori <vvvv767@hotmail.com.>
COPYRIGHT
This package is free software. Tou can redistribute and/or modify it under the same terms as Perl itself.
# }}}
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 376:
'=item' outside of any '=over'