Inheritance diagram for DboSqlite:

Public Member Functions | |
| _execute ($sql) | |
| buildColumn ($column) | |
| buildIndex ($indexes, $table=null) | |
| column ($real) | |
| connect () | |
| describe (&$model) | |
| disconnect () | |
| execute ($sql) | |
| fetchResult () | |
| getEncoding () | |
| index (&$model) | |
| lastAffected () | |
| lastError () | |
| lastInsertId () | |
| lastNumRows () | |
| limit ($limit, $offset=null) | |
| listSources () | |
| renderStatement ($type, $data) | |
| resultSet (&$results) | |
| setEncoding ($enc) | |
| truncate ($table) | |
| update (&$model, $fields=array(), $values=null, $conditions=null) | |
| value ($data, $column=null, $safe=false) | |
Public Attributes | |
| $_baseConfig | |
| $_commands | |
| $_queryStats = array() | |
| $columns | |
| $description = "SQLite DBO Driver" | |
| $endQuote = '"' | |
| $startQuote = '"' | |
Definition at line 35 of file dbo_sqlite.php.
| DboSqlite::_execute | ( | $ | sql | ) |
Executes given SQL statement.
| string | $sql SQL statement |
Definition at line 132 of file dbo_sqlite.php.
References fetchResult(), and resultSet().
Referenced by connect(), and setEncoding().
| DboSqlite::buildColumn | ( | $ | column | ) |
Generate a database-native column schema string
| array | $column An array structured like the following: array('name'=>'value', 'type'=>'value'[, options]), where options can be 'default', 'length', or 'key'. |
Reimplemented from DboSource.
Definition at line 437 of file dbo_sqlite.php.
References $out, DboSource::length(), limit(), DboSource::name(), and value().
| DboSqlite::buildIndex | ( | $ | indexes, | |
| $ | table = null | |||
| ) |
Removes redundant primary key indexes, as they are handled in the column def of the key.
| array | $indexes | |
| string | $table |
Reimplemented from DboSource.
Definition at line 510 of file dbo_sqlite.php.
References $out, column(), and DboSource::name().
| DboSqlite::column | ( | $ | real | ) |
Converts database-layer column types to basic types
| string | $real Real database-layer column type (i.e. "varchar(255)") |
Reimplemented from DataSource.
Definition at line 333 of file dbo_sqlite.php.
References limit(), and DboSource::name().
Referenced by buildIndex(), describe(), and index().
| DboSqlite::connect | ( | ) |
Connects to the database using config['database'] as a filename.
| array | $config Configuration array for connecting |
Definition at line 106 of file dbo_sqlite.php.
References DataSource::$config, _execute(), and config().
| DboSqlite::describe | ( | &$ | model | ) |
Returns an array of the fields in given table name.
| string | $tableName Name of database table to inspect |
Definition at line 183 of file dbo_sqlite.php.
References DataSource::__cacheDescription(), column(), DboSource::fetchAll(), DboSource::fullTableName(), index(), DboSource::length(), and DboSource::name().
| DboSqlite::disconnect | ( | ) |
Disconnects from database.
Definition at line 121 of file dbo_sqlite.php.
| DboSqlite::execute | ( | $ | sql | ) |
Overrides DboSource::execute() to correctly handle query statistics
| string | $sql |
Definition at line 147 of file dbo_sqlite.php.
Referenced by truncate().
| DboSqlite::fetchResult | ( | ) |
Fetches the next row from the current result set
Definition at line 390 of file dbo_sqlite.php.
References DboSource::$index.
Referenced by _execute().
| DboSqlite::getEncoding | ( | ) |
Gets the database encoding
Definition at line 500 of file dbo_sqlite.php.
References DboSource::fetchRow().
| DboSqlite::index | ( | &$ | model | ) |
Overrides DboSource::index to handle SQLite indexe introspection Returns an array of the indexes in given table name.
| string | $model Name of model to inspect |
Definition at line 540 of file dbo_sqlite.php.
References DboSource::$index, column(), DboSource::fullTableName(), DboSource::name(), and DboSource::query().
Referenced by describe().
| DboSqlite::lastAffected | ( | ) |
Returns number of affected rows in previous database operation. If no previous operation exists, this returns false.
Definition at line 297 of file dbo_sqlite.php.
| DboSqlite::lastError | ( | ) |
Returns a formatted error message from previous database operation.
Definition at line 285 of file dbo_sqlite.php.
References DataSource::$error.
| DboSqlite::lastInsertId | ( | ) |
Returns the ID generated from the previous INSERT operation.
Definition at line 324 of file dbo_sqlite.php.
| DboSqlite::lastNumRows | ( | ) |
Returns number of rows in previous resultset. If no previous resultset exists, this returns false.
Definition at line 313 of file dbo_sqlite.php.
References DboSource::hasResult().
| DboSqlite::limit | ( | $ | limit, | |
| $ | offset = null | |||
| ) |
Returns a limit statement in the correct format for the particular database.
| integer | $limit Limit of results returned | |
| integer | $offset Offset from which to start results |
Reimplemented from DboSource.
Definition at line 416 of file dbo_sqlite.php.
Referenced by buildColumn(), and column().
| DboSqlite::listSources | ( | ) |
Returns an array of tables in the database. If there are no tables, an error is raised and the application exits.
Definition at line 157 of file dbo_sqlite.php.
References DboSource::fetchAll(), and DboSource::name().
| DboSqlite::renderStatement | ( | $ | type, | |
| $ | data | |||
| ) |
Overrides DboSource::renderStatement to handle schema generation with SQLite-style indexes
| string | $type | |
| array | $data |
Reimplemented from DboSource.
Definition at line 577 of file dbo_sqlite.php.
| DboSqlite::resultSet | ( | &$ | results | ) |
Enter description here...
| unknown_type | $results |
Definition at line 367 of file dbo_sqlite.php.
References DboSource::$index.
Referenced by _execute().
| DboSqlite::setEncoding | ( | $ | enc | ) |
Sets the database encoding
| string | $enc Database encoding |
Definition at line 489 of file dbo_sqlite.php.
References _execute().
| DboSqlite::truncate | ( | $ | table | ) |
Deletes all the records in a table and resets the count of the auto-incrementing primary key, where applicable.
| mixed | $table A string or model class representing the table to be truncated |
Reimplemented from DboSource.
Definition at line 277 of file dbo_sqlite.php.
References execute(), and DboSource::fullTableName().
| DboSqlite::update | ( | &$ | model, | |
| $ | fields = array(), |
|||
| $ | values = null, |
|||
| $ | conditions = null | |||
| ) |
Generates and executes an SQL UPDATE statement for given model, fields, and values.
| Model | $model | |
| array | $fields | |
| array | $values | |
| mixed | $conditions |
Reimplemented from DboSource.
Definition at line 255 of file dbo_sqlite.php.
| DboSqlite::value | ( | $ | data, | |
| $ | column = null, |
|||
| $ | safe = false | |||
| ) |
Returns a quoted and escaped string of $data for use in an SQL statement.
| string | $data String to be prepared for use in an SQL statement |
Reimplemented from DboSource.
Definition at line 219 of file dbo_sqlite.php.
References DboSource::boolean().
Referenced by buildColumn().
| DboSqlite::$_baseConfig |
Initial value:
array(
'persistent' => true,
'database' => null,
'connect' => 'sqlite_popen'
)
Reimplemented from DataSource.
Definition at line 66 of file dbo_sqlite.php.
| DboSqlite::$_commands |
| DboSqlite::$_queryStats = array() |
Definition at line 60 of file dbo_sqlite.php.
| DboSqlite::$columns |
Initial value:
array(
'primary_key' => array('name' => 'integer primary key'),
'string' => array('name' => 'varchar', 'limit' => '255'),
'text' => array('name' => 'text'),
'integer' => array('name' => 'integer', 'limit' => 11, 'formatter' => 'intval'),
'float' => array('name' => 'float', 'formatter' => 'floatval'),
'datetime' => array('name' => 'datetime', 'format' => 'Y-m-d H:i:s', 'formatter' => 'date'),
'timestamp' => array('name' => 'timestamp', 'format' => 'Y-m-d H:i:s', 'formatter' => 'date'),
'time' => array('name' => 'time', 'format' => 'H:i:s', 'formatter' => 'date'),
'date' => array('name' => 'date', 'format' => 'Y-m-d', 'formatter' => 'date'),
'binary' => array('name' => 'blob'),
'boolean' => array('name' => 'boolean')
)
Definition at line 87 of file dbo_sqlite.php.
| DboSqlite::$description = "SQLite DBO Driver" |
| DboSqlite::$endQuote = '"' |
| DboSqlite::$startQuote = '"' |
1.4.7