\Pluf_DB_SQLite

SQLite connection class

Summary

Methods
Properties
Constants
__construct()
getServerInfo()
debug()
close()
select()
execute()
getLastID()
getError()
esc()
qn()
begin()
commit()
rollback()
__toString()
$con_id
$pfx
$lastquery
$engine
$type_cast
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$debug
N/A

Properties

$con_id

$con_id : 

Type

$pfx

$pfx : 

Type

$lastquery

$lastquery : 

The last query, set with debug().

Used when an error is returned.

Type

$engine

$engine : 

Type

$type_cast

$type_cast : 

Type

$debug

$debug : 

Type

Methods

__construct()

__construct(  $user,   $pwd,   $server,   $dbname,   $pfx = '',   $debug = false) 

Parameters

$user
$pwd
$server
$dbname
$pfx
$debug

getServerInfo()

getServerInfo() : string

Get the version of the SQLite library.

Returns

string —

Version string

debug()

debug(  $query) : boolean

Log the queries.

Keep track of the last query and if in debug mode keep track of all the queries in $GLOBALS['_PX_debug_data']['sql_queries']

Parameters

$query

Returns

boolean —

true

close()

close() 

select()

select(  $query) 

Parameters

$query

execute()

execute(  $query) 

Parameters

$query

getLastID()

getLastID() 

getError()

getError() : string

Returns a string ready to be used in the exception.

Returns

string —

Error string

esc()

esc(  $str) 

Parameters

$str

qn()

qn(  $col) : string

Quote the column name.

Parameters

$col

Returns

string —

Escaped name

begin()

begin() 

Start a transaction.

commit()

commit() 

Commit a transaction.

rollback()

rollback() 

Rollback a transaction.

__toString()

__toString()