Class sqlite3
SQLite 3 storage driver.
The database file is always opened in read/write privileges mode and automatically created, if it does not yet exist.
- Core\Object implements Core\Chainable
- Core\Set implements Core\Accessor
- Core\Storage
- Core\Storage\Driver\sqlite3
Package: Core\Storage
Since: 3.1
Requires: PHP 5.3, SQLite 3
Version: 1.0-alpha
Located at Storage/Driver/sqlite3.inc.php
Methods summary
public
|
|
public
|
|
public
|
|
protected
string
|
#
_formatSQLiteError( string $failedAction )
Formats an error message based on an action string that is extended by the SQLite error code and message from the back-end. |
public
string
|
#
backendVersion( )
Returns the back-end version string. Some drivers use different layers for their backend storage (e.g. an interface library and a server) with different versions for each layer. The most basic layer, available and significant version is returned (e.g. the database server version). SQLite does not connect to a remote server, hence client and server version are the same. |
public
string|false
|
|
public
string
|
#
clientVersion( )
Returns the client version string. Some drivers use different layers for their back-end storage (e.g. an interface library and a server) with different versions for each layer. The highest layer, available and significant version is returned (e.g. the database client version). SQLite does not connect to a remote server, hence client and server version are the same. |
public
|
|
public
string
|
#
escape( string $value, boolean $addDelimiters = false )
Escapes a binary string specific to the storage back-end for direct usage. When performing direct commands on the back-end engine, most storage systems require the user to escaped data sequences (e.g. SQL). Each data sequence used for direct commands should therefore be preprocessed by this method prior to sending the command. |
public
Storage_Result
|
#
execute( mixed $statement, array $parameters = null )
Executes an accessor node, prepared storage statement or direct back-end query. |
public
|
|
public
|
|
public
|
|
public static
integer
|
#
unifyErrorCode( integer $code )
Translates a SQLite 3-specific error code into the unified error codes used by Core Storage. |
Methods inherited from Core\Storage
Methods inherited from Core\Object
__autocreateFactory()
,
__call()
,
__processParameters()
,
__toString()
,
attachMethod()
,
chain()
,
getValueForKey()
,
getValueForKeyPath()
,
getValueForUndefinedKey()
,
hash()
,
issetValueForKey()
,
setValueForKey()
,
setValueForKeyPath()
,
setValueForUndefinedKey()
,
uuid()
Constants summary
string |
IndexModeParameter
Index mode parameter name. |
#
'index'
|
string |
NumericIndexMode
Index modes that uses numeric indices for result columns. Column names are ignored. Slightly reduces memory overhead. |
#
'numeric'
|
string |
AssociativeIndexMode
Index mode that uses associative indices for result columns. Indices are based on the table column name or selection expression. This is the default. |
#
'assoc'
|
Constants inherited from Core\Storage
Constants inherited from Core\Object
AnyParameterType
,
AutochainParameterType
,
AutocreateParameterType
,
BooleanParameterType
,
CharParameterType
,
EnumParameterType
,
IntegerParameterType
,
RealParameterType
,
StringParameterType
,
UserParameterType
Properties summary
protected
array
|
$_v_parameters
Cached driver configuration array. |
|
protected
|
$_v_uri
Driver configuration URI. Required for re-connecting to the database. |
|
protected
|
$_db
Database interface instance. |
Properties inherited from Core\Storage
Magic properties
public read-only
array
|
$parameters
Cached driver configuration array. |
public read-only
|
$uri
Driver configuration URI. |