SQLite specific class

Extends PDO to simplify cross-database issues

package Query
subpackage Drivers

 Methods

Open SQLite Database

__construct(string $dsn, string $user, string $pass) 

Parameters

$dsn

string

$user

string

$pass

string

__sleep()

__sleep() 
Inherited

inherited_from PDO::__sleep()
inherited_from \DB_PDO::__sleep()

__wakeup()

__wakeup() 
Inherited

inherited_from PDO::__wakeup()
inherited_from \DB_PDO::__wakeup()

Returns number of rows affected by an INSERT, UPDATE, DELETE type query

affected_rows(\PDOStatement $statement) : int
Inherited

inherited_from \DB_PDO::affected_rows()

Parameters

$statement

\PDOStatement

Returns

int

beginTransaction()

beginTransaction() 
Inherited

inherited_from PDO::beginTransaction()
inherited_from \DB_PDO::beginTransaction()

commit()

commit() 
Inherited

inherited_from PDO::commit()
inherited_from \DB_PDO::commit()

Method to simplify retreiving db results for meta-data queries

driver_query(string $sql, bool $filtered_index) : mixed
Inherited

inherited_from \DB_PDO::driver_query()

Parameters

$sql

string

$filtered_index

bool

Returns

mixed

Deletes all the rows from a table. Does the same as the truncate method if the database does not support 'TRUNCATE';

empty_table(string $table) : mixed
Inherited

inherited_from \DB_PDO::empty_table()

Parameters

$table

string

Returns

mixed

errorCode()

errorCode() 
Inherited

inherited_from PDO::errorCode()
inherited_from \DB_PDO::errorCode()

errorInfo()

errorInfo() 
Inherited

inherited_from PDO::errorInfo()
inherited_from \DB_PDO::errorInfo()

exec()

exec() 
Inherited

inherited_from PDO::exec()
inherited_from \DB_PDO::exec()

getAttribute()

getAttribute() 
Inherited

inherited_from PDO::getAttribute()
inherited_from \DB_PDO::getAttribute()

getAvailableDrivers()

getAvailableDrivers() 
Inherited

inherited_from PDO::getAvailableDrivers()
inherited_from \DB_PDO::getAvailableDrivers()

Retrieve column information for the current database table

get_columns(string $table) : array
Inherited

inherited_from \DB_PDO::get_columns()

Parameters

$table

string

Returns

array

Return list of dbs for the current connection, if possible

get_dbs() : array
Inherited

inherited_from \DB_PDO::get_dbs()

Returns

array

Return list of function for the current database

get_functions() : array
Inherited

inherited_from \DB_PDO::get_functions()

Returns

array

Return the last error for the current database connection

get_last_error() : string
Inherited

inherited_from \DB_PDO::get_last_error()

Returns

string

Return list of stored procedures for the current database

get_procedures() : array
Inherited

inherited_from \DB_PDO::get_procedures()

Returns

array

Retreives the data from a select query

get_query_data(\PDOStatement $statement) : array
Inherited

inherited_from \DB_PDO::get_query_data()

Parameters

$statement

\PDOStatement

Returns

array

Return schemas for databases that list them

get_schemas() : array
Inherited

inherited_from \DB_PDO::get_schemas()

Returns

array

Return list of sequences for the current database, if they exist

get_sequences() : array
Inherited

inherited_from \DB_PDO::get_sequences()

Returns

array

List system tables for the current database

get_system_tables() : array

Returns

array

List tables for the current database

get_tables() : mixed

Returns

mixed

Return list of triggers for the current database

get_triggers() : array
Inherited

inherited_from \DB_PDO::get_triggers()

Returns

array

Retrieve list of data types for the database

get_types() : array
Inherited

inherited_from \DB_PDO::get_types()

Returns

array

Return list of views for the current database

get_views() : array
Inherited

inherited_from \DB_PDO::get_views()

Returns

array

inTransaction()

inTransaction() 
Inherited

inherited_from PDO::inTransaction()
inherited_from \DB_PDO::inTransaction()

lastInsertId()

lastInsertId() 
Inherited

inherited_from PDO::lastInsertId()
inherited_from \DB_PDO::lastInsertId()

Load a database for the current connection

load_database(string $db, string $name) 

Parameters

$db

string

$name

string

Return the number of rows returned for a SELECT query

num_rows() : int
Inherited

inherited_from \DB_PDO::num_rows()

Returns

int

prepare()

prepare() 
Inherited

inherited_from PDO::prepare()
inherited_from \DB_PDO::prepare()

Create and execute a prepared statement with the provided parameters

prepare_execute(string $sql, array $params) : \PDOStatement
Inherited

inherited_from \DB_PDO::prepare_execute()

Parameters

$sql

string

$params

array

Returns

Simplifies prepared statements for database queries

prepare_query(string $sql, array $data) : mixed
Inherited

inherited_from \DB_PDO::prepare_query()

Parameters

$sql

string

$data

array

Returns

mixedPDOStatement / FALSE

query()

query() 
Inherited

inherited_from PDO::query()
inherited_from \DB_PDO::query()

quote()

quote() 
Inherited

inherited_from PDO::quote()
inherited_from \DB_PDO::quote()

Surrounds the string with the databases identifier escape characters

quote_ident(mixed $ident) : string
Inherited

inherited_from \DB_PDO::quote_ident()

Parameters

$ident

mixed

Returns

string

rollBack()

rollBack() 
Inherited

inherited_from PDO::rollBack()
inherited_from \DB_PDO::rollBack()

setAttribute()

setAttribute() 
Inherited

inherited_from PDO::setAttribute()
inherited_from \DB_PDO::setAttribute()

Doesn't apply to sqlite

switch_db(string $name) : void

Parameters

$name

string

Empty a table

truncate(string $table) : void

Parameters

$table

string

Unload a database from the current connection

unload_database(string $name) 

Parameters

$name

string

Helper method for quote_ident

_quote(mixed $str) : mixed
Inherited

inherited_from \DB_PDO::_quote()

Parameters

$str

mixed

Returns

mixed

 Properties

 

Reference to sql sub class

$sql : Object
Inherited

inherited_from \DB_PDO::$$sql
 

Reference to util sub class

$util : Object
Inherited

inherited_from \DB_PDO::$$util
 

Character to escape identifiers

$escape_char : string
Inherited

inherited_from \DB_PDO::$$escape_char
 

Reference to the last executed sql query

$statement : \PDOStatement