PHP Class CI_DB_sqlite3_driver, TastyIgniter

Note: _DB is an extender class that the app controller creates dynamically based on whether the query builder class is being used or not.
Author: Andrey Andreev
Inheritance: extends CI_DB
Show file Open project: tastyigniter/tastyigniter

Public Properties

Property Type Description
$dbdriver string Database driver

Protected Properties

Property Type Description
$_random_keyword array ORDER BY random keyword

Public Methods

Method Description
affected_rows ( ) : integer Affected Rows
db_connect ( boolean $persistent = FALSE ) : SQLite3 Non-persistent database connection
error ( ) : array Error
field_data ( string $table ) : array Returns an object with field data
insert_id ( ) : integer Insert ID
list_fields ( string $table ) : array Fetch Field Names
version ( ) : string Database version number

Protected Methods

Method Description
_close ( ) : void Close DB Connection
_escape_str ( $str ) : string Platform-dependant string escape
_execute ( string $sql ) : mixed Execute the query
_list_tables ( boolean $prefix_limit = FALSE ) : string Show table query
_replace ( string $table, array $keys, array $values ) : string Replace statement
_trans_begin ( ) : boolean Begin Transaction
_trans_commit ( ) : boolean Commit Transaction
_trans_rollback ( ) : boolean Rollback Transaction
_truncate ( string $table ) : string Truncate statement

Method Details

_close() protected method

Close DB Connection
protected _close ( ) : void
return void

_escape_str() protected method

Platform-dependant string escape
protected _escape_str ( $str ) : string
return string

_execute() protected method

Execute the query
protected _execute ( string $sql ) : mixed
$sql string
return mixed SQLite3Result object or bool

_list_tables() protected method

Generates a platform-specific query string so that the table names can be fetched
protected _list_tables ( boolean $prefix_limit = FALSE ) : string
$prefix_limit boolean
return string

_replace() protected method

Generates a platform-specific replace string from the supplied data
protected _replace ( string $table, array $keys, array $values ) : string
$table string Table name
$keys array INSERT keys
$values array INSERT values
return string

_trans_begin() protected method

Begin Transaction
protected _trans_begin ( ) : boolean
return boolean

_trans_commit() protected method

Commit Transaction
protected _trans_commit ( ) : boolean
return boolean

_trans_rollback() protected method

Rollback Transaction
protected _trans_rollback ( ) : boolean
return boolean

_truncate() protected method

Generates a platform-specific truncate string from the supplied data If the database does not support the TRUNCATE statement, then this method maps to 'DELETE FROM table'
protected _truncate ( string $table ) : string
$table string
return string

affected_rows() public method

Affected Rows
public affected_rows ( ) : integer
return integer

db_connect() public method

Non-persistent database connection
public db_connect ( boolean $persistent = FALSE ) : SQLite3
$persistent boolean
return SQLite3

error() public method

Returns an array containing code and message of the last database error that has occured.
public error ( ) : array
return array

field_data() public method

Returns an object with field data
public field_data ( string $table ) : array
$table string
return array

insert_id() public method

Insert ID
public insert_id ( ) : integer
return integer

list_fields() public method

Fetch Field Names
public list_fields ( string $table ) : array
$table string Table name
return array

version() public method

Database version number
public version ( ) : string
return string

Property Details

$_random_keyword protected property

ORDER BY random keyword
protected array $_random_keyword
return array

$dbdriver public property

Database driver
public string $dbdriver
return string