Public Member Functions | |
isConnected () | |
closeConnection () | |
prepare ($sql) | |
lastInsertId ($tableName=null, $primaryKey=null) | |
query ($sql, $bind=array()) | |
exec ($sql) | |
setFetchMode ($mode) | |
supportsParameters ($type) | |
getServerVersion () | |
Protected Member Functions | |
_dsn () | |
_connect () | |
_quote ($value) | |
_beginTransaction () | |
_commit () | |
_rollBack () | |
Protected Attributes | |
$_defaultStmtClass = 'Zend_Db_Statement_Pdo' |
Definition at line 45 of file Abstract.php.
_beginTransaction | ( | ) | [protected] |
Begin a transaction.
Reimplemented from Zend_Db_Adapter_Abstract.
Reimplemented in Zend_Db_Adapter_Pdo_Mssql.
Definition at line 302 of file Abstract.php.
_commit | ( | ) | [protected] |
Commit a transaction.
Reimplemented from Zend_Db_Adapter_Abstract.
Reimplemented in Zend_Db_Adapter_Pdo_Mssql.
Definition at line 311 of file Abstract.php.
_connect | ( | ) | [protected] |
Creates a PDO object and connects to the database.
Zend_Db_Adapter_Exception |
Reimplemented from Zend_Db_Adapter_Abstract.
Reimplemented in Zend_Db_Adapter_Pdo_Ibm, Zend_Db_Adapter_Pdo_Mssql, Zend_Db_Adapter_Pdo_Mysql, Zend_Db_Adapter_Pdo_Pgsql, and Zend_Db_Adapter_Pdo_Sqlite.
Definition at line 87 of file Abstract.php.
_dsn | ( | ) | [protected] |
Creates a PDO DSN for the adapter from $this->_config settings.
Reimplemented in Zend_Db_Adapter_Pdo_Ibm, Zend_Db_Adapter_Pdo_Mssql, Zend_Db_Adapter_Pdo_Oci, and Zend_Db_Adapter_Pdo_Sqlite.
Definition at line 60 of file Abstract.php.
_quote | ( | $ | value ) | [protected] |
Quote a raw string.
string | $value | Raw string |
Reimplemented from Zend_Db_Adapter_Abstract.
Reimplemented in Zend_Db_Adapter_Pdo_Oci.
Definition at line 290 of file Abstract.php.
_rollBack | ( | ) | [protected] |
Roll-back a transaction.
Reimplemented from Zend_Db_Adapter_Abstract.
Reimplemented in Zend_Db_Adapter_Pdo_Mssql.
Definition at line 320 of file Abstract.php.
closeConnection | ( | ) |
Force the connection to close.
Reimplemented from Zend_Db_Adapter_Abstract.
Definition at line 164 of file Abstract.php.
exec | ( | $ | sql ) |
Executes an SQL statement and return the number of affected rows
mixed | $sql | The SQL statement with placeholders. May be a string or Zend_Db_Select. |
Definition at line 256 of file Abstract.php.
getServerVersion | ( | ) |
Retrieve server version in PHP style
Reimplemented from Zend_Db_Adapter_Abstract.
Reimplemented in Zend_Db_Adapter_Pdo_Ibm, and Zend_Db_Adapter_Pdo_Mssql.
Definition at line 384 of file Abstract.php.
isConnected | ( | ) |
Test if a connection is active
Reimplemented from Zend_Db_Adapter_Abstract.
Definition at line 154 of file Abstract.php.
lastInsertId | ( | $ | tableName = null , |
$ | primaryKey = null |
||
) |
Gets the last ID generated automatically by an IDENTITY/AUTOINCREMENT column.
As a convention, on RDBMS brands that support sequences (e.g. Oracle, PostgreSQL, DB2), this method forms the name of a sequence from the arguments and returns the last id generated by that sequence. On RDBMS brands that support IDENTITY/AUTOINCREMENT columns, this method returns the last value generated for such a column, and the table name argument is disregarded.
On RDBMS brands that don't support sequences, $tableName and $primaryKey are ignored.
string | $tableName | OPTIONAL Name of table. |
string | $primaryKey | OPTIONAL Name of primary key column. |
Reimplemented from Zend_Db_Adapter_Abstract.
Reimplemented in Zend_Db_Adapter_Pdo_Ibm, Zend_Db_Adapter_Pdo_Mssql, Zend_Db_Adapter_Pdo_Oci, and Zend_Db_Adapter_Pdo_Pgsql.
Definition at line 206 of file Abstract.php.
prepare | ( | $ | sql ) |
Prepares an SQL statement.
string | $sql | The SQL statement with placeholders. |
array | $bind | An array of data to bind to the placeholders. |
Reimplemented from Zend_Db_Adapter_Abstract.
Reimplemented in Zend_Db_Adapter_Pdo_Ibm.
Definition at line 176 of file Abstract.php.
query | ( | $ | sql, |
$ | bind = array() |
||
) |
Special handling for PDO query(). All bind parameter names must begin with ':'
string | Zend_Db_Select | $sql | The SQL statement with placeholders. |
array | $bind | An array of data to bind to the placeholders. |
Zend_Db_Adapter_Exception | To re-throw PDOException. |
Reimplemented from Zend_Db_Adapter_Abstract.
Definition at line 221 of file Abstract.php.
setFetchMode | ( | $ | mode ) |
Set the PDO fetch mode.
int | $mode | A PDO fetch mode. |
Zend_Db_Adapter_Exception |
Reimplemented from Zend_Db_Adapter_Abstract.
Definition at line 334 of file Abstract.php.
supportsParameters | ( | $ | type ) |
Check if the adapter supports real SQL parameters.
string | $type | 'positional' or 'named' |
Reimplemented from Zend_Db_Adapter_Abstract.
Definition at line 369 of file Abstract.php.