Method |
Description |
|
__call ( string $method, array $args ) : mixed |
Delegate calls to the schema object. |
|
__construct ( array $config ) |
Constructor. |
|
__destruct ( ) |
Free any resources that are open. |
|
__sleep ( ) |
Serialize callback. |
|
__wakeup ( ) |
Unserialize callback. |
|
adapterName ( ) : string |
Returns the human-readable name of the adapter. Use mixed case - one
can always use downcase if needed. |
|
addLimitOffset ( string $sql, array $options ) : string |
Appends LIMIT and OFFSET options to a SQL statement. |
|
addLock ( &$sql, array $options = [] ) |
Appends a locking clause to an SQL statement. |
|
cacheRead ( string $key ) : string |
Reads values from the cache handler. |
|
cacheWrite ( string $key, string $value ) |
Writes values to the cache handler. |
|
delete ( string $sql, mixed $arg1 = null, string $arg2 = null ) : integer |
Executes the delete statement and returns the number of rows affected. |
|
disconnect ( ) |
Disconnect from db. |
|
emptyInsertStatement ( string $tableName ) : string |
TODO |
|
getCache ( ) : Horde_Cache |
|
|
getLastQuery ( ) : string |
Get the last query run |
|
getLogger ( ) |
return Horde_Log_Logger |
|
getOption ( string $option ) : mixed |
Returns an adaptor option set through the constructor. |
|
insertBlob ( string $table, array $fields, string $pk = null, integer $idValue = null ) : integer |
Inserts a row including BLOBs into a table. |
|
insertFixture ( TODO $fixture, TODO $tableName ) : TODO |
Inserts the given fixture into the table. Overridden in adapters that
require something beyond a simple insert (eg. Oracle). |
|
isActive ( ) : boolean |
Is the connection active? |
|
prefetchPrimaryKey ( $tableName = null ) : boolean |
Should primary key values be selected from their corresponding
sequence before the insert statement? If true, next_sequence_value
is called before each insert to set the record's primary key. |
|
rawConnection ( ) : resource |
Provides access to the underlying database connection. Useful for when
you need to call a proprietary method such as postgresql's
lo_* methods. |
|
reconnect ( ) |
Reconnect to the db. |
|
resetRuntime ( ) : integer |
Reset the timer |
|
sanitizeLimit ( $limit ) |
TODO |
|
selectAll ( string $sql, mixed $arg1 = null, string $arg2 = null ) : array |
Returns an array of record hashes with the column names as keys and
column values as values. |
|
selectAssoc ( string $sql, mixed $arg1 = null, string $arg2 = null ) : array |
Returns an array where the keys are the first column of a select, and the
values are the second column: |
|
selectOne ( string $sql, mixed $arg1 = null, string $arg2 = null ) : array |
Returns a record hash with the column names as keys and column values
as values. |
|
selectValue ( string $sql, mixed $arg1 = null, string $arg2 = null ) : string |
Returns a single value from a record |
|
selectValues ( string $sql, mixed $arg1 = null, string $arg2 = null ) : array |
Returns an array of the values of the first column in a select:
selectValues("SELECT id FROM companies LIMIT 3") => [1,2,3] |
|
setCache ( Horde_Cache $cache ) |
Set a cache object. |
|
setLogger ( Horde_Log_Logger $logger ) |
Set a logger object. |
|
supportsCountDistinct ( ) : boolean |
Does this adapter support using DISTINCT within COUNT? This is +true+
for all adapters except sqlite. |
|
supportsInterval ( ) : boolean |
Does this adapter support using INTERVAL statements? This is +true+
for all adapters except sqlite. |
|
supportsMigrations ( ) : boolean |
Does this adapter support migrations? Backend specific, as the
abstract adapter always returns +false+. |
|
transactionStarted ( ) : boolean |
Check if a transaction has been started. |
|
update ( string $sql, mixed $arg1 = null, string $arg2 = null ) : integer |
Executes the update statement and returns the number of rows affected. |
|
updateBlob ( string $table, array $fields, string | array $where = null ) |
Updates rows including BLOBs into a table. |
|