![]() |
![]() |
Supporting the evolution of a new free world. |
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
SQLite3 DBE Driver
DOCUMENTATIONNAME
DBE::Driver::SQLITE3 - SQLite3 driver for the Perl Database Express Engine
SYNOPSIS
use DBE; $dsn = "Provider=SQLite3;Db=test.db;Charset=utf-8"; $con = DBE->connect( $dsn ); $res = $con->query( 'SELECT * FROM table' ); or $stmt = $con->prepare( 'SELECT * FROM table' ); $res = $stmt->execute(); or $con->prepare( 'SELECT * FROM table' ); $res = $con->execute(); EXAMPLE
use DBE; # connect with parameters as hash $con = DBE->connect( 'provider' => 'SQLite3', 'db' => 'test.db', 'charset' => 'utf-8', ); # create a table $con->do( qq/ CREATE TABLE CFG_Config ( CFG_Index INTEGER PRIMARY KEY, CFG_Name TEXT, CFG_Value TEXT, UNIQUE (CFG_Name) ) / ); # insert an entry $con->do( "INSERT INTO CFG_Config (CFG_Name,CFG_Value) VALUES('foo','bar')" ); # or with placeholders # $con->do( # "INSERT INTO CFG_Config (CFG_Name,CFG_Value) VALUES(?,?)", # 'foo', 'bar' # ); # select the entry $res = $con->query( "SELECT CFG_Value FROM CFG_Config WHERE CFG_Name = 'foo'" ); # or with placeholders # $res = $con->query( # "SELECT CFG_Value FROM CFG_Config WHERE CFG_Name = ?", # 'foo' # ); ($foo) = $res->fetch_row(); print "\$foo = '$foo'\n"; # output: # $foo = 'bar' DESCRIPTION
DBE::Driver::SQLITE3 is a SQLite3 database driver for the Perl Database Express Engine.
CONNECT
use DBE; DBE->connect( 'Provider=SQLite3;Database=sqlite3.db' ); The following parameters are specified:
LIMITATIONS
Client character set is limited to UTF-8.
Detailed field information is available only if both SQLite3 and the driver are compiled with the flag SQLITE_ENABLE_COLUMN_METADATA.
AUTHORS
Written by Christian Mueller
COPYRIGHT
The DBE::Driver::SQLITE3 module is free software. You may distribute under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Generated with Perl 5.10.1 and
Perl-CGI 1.0 over
FastCGI within 24.46ms
in memory safe mode.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||