Abstract Class Zend_Db_Adapter_Pdo_Abstract

Description

Class for connecting to SQL databases and performing common operations using PDO.

  • copyright: Copyright (c) 2005-2007 Zend Technologies USA Inc. (http://www.zend.com)
  • abstract:
  • license: New BSD License

Located in /Db/Adapter/Pdo/Abstract.php (line 46)

Zend_Db_Adapter_Abstract
   |
   --Zend_Db_Adapter_Pdo_Abstract
Direct descendents
Class Description
 class Zend_Db_Adapter_Pdo_Mssql Class for connecting to Microsoft SQL Server databases and performing common operations.
 class Zend_Db_Adapter_Pdo_Mysql Class for connecting to MySQL databases and performing common operations.
 class Zend_Db_Adapter_Pdo_Oci Class for connecting to Oracle databases and performing common operations.
 class Zend_Db_Adapter_Pdo_Pgsql Class for connecting to PostgreSQL databases and performing common operations.
 class Zend_Db_Adapter_Pdo_Sqlite Class for connecting to SQLite2 and SQLite3 databases and performing common operations.
Method Summary
 void closeConnection ()
 integer lastInsertId ([string $tableName = null], [string $primaryKey = null])
 PDOStatement prepare (string $sql, array $bind)
 Zend_Db_Pdo_Statement query (string|Zend_Db_Select $sql, [array $bind = array()])
 void setFetchMode (int $mode)
 void _commit ()
 void _connect ()
 string _dsn ()
 string _quote (string $value)
 void _rollBack ()
Variables
Methods
closeConnection (line 139)

Force the connection to close.

  • access: public
void closeConnection ()

Redefinition of:
Zend_Db_Adapter_Abstract::closeConnection()
Force the connection to close.
lastInsertId (line 176)

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.

  • access: public
integer lastInsertId ([string $tableName = null], [string $primaryKey = null])
  • string $tableName: OPTIONAL Name of table.
  • string $primaryKey: OPTIONAL Name of primary key column.

Redefinition of:
Zend_Db_Adapter_Abstract::lastInsertId()
Gets the last ID generated automatically by an IDENTITY/AUTOINCREMENT column.

Redefined in descendants as:
prepare (line 151)

Prepares an SQL statement.

  • access: public
PDOStatement prepare (string $sql, array $bind)
  • string $sql: The SQL statement with placeholders.
  • array $bind: An array of data to bind to the placeholders.

Redefinition of:
Zend_Db_Adapter_Abstract::prepare()
Prepare a statement and return a PDOStatement-like object.
query (line 191)

Special handling for PDO query().

All bind parameter names must begin with ':'

  • throws: Zend_Db_Adapter_Exception To re-throw PDOException.
  • access: public
Zend_Db_Pdo_Statement query (string|Zend_Db_Select $sql, [array $bind = array()])
  • string|Zend_Db_Select $sql: The SQL statement with placeholders.
  • array $bind: An array of data to bind to the placeholders.

Redefinition of:
Zend_Db_Adapter_Abstract::query()
Prepares and executes an SQL statement with bound data.
setFetchMode (line 260)

Set the PDO fetch mode.

  • todo: Support FETCH_CLASS and FETCH_INTO.
  • access: public
void setFetchMode (int $mode)
  • int $mode: A PDO fetch mode.

Redefinition of:
Zend_Db_Adapter_Abstract::setFetchMode()
Set the fetch mode.
_beginTransaction (line 229)

Begin a transaction.

  • access: protected
void _beginTransaction ()

Redefinition of:
Zend_Db_Adapter_Abstract::_beginTransaction()
Begin a transaction.
_commit (line 238)

Commit a transaction.

  • access: protected
void _commit ()

Redefinition of:
Zend_Db_Adapter_Abstract::_commit()
Commit a transaction.
_connect (line 79)

Creates a PDO object and connects to the database.

  • throws: Zend_Db_Adapter_Exception
  • access: protected
void _connect ()

Redefinition of:
Zend_Db_Adapter_Abstract::_connect()
Creates a connection to the database.

Redefined in descendants as:
_dsn (line 54)

Creates a PDO DSN for the adapter from $this->_config settings.

  • access: protected
string _dsn ()

Redefined in descendants as:
_quote (line 220)

Quote a raw string.

  • return: Quoted string
  • access: protected
string _quote (string $value)
  • string $value: Raw string

Redefinition of:
Zend_Db_Adapter_Abstract::_quote()
Quote a raw string.

Redefined in descendants as:
_rollBack (line 247)

Roll-back a transaction.

  • access: protected
void _rollBack ()

Redefinition of:
Zend_Db_Adapter_Abstract::_rollBack()
Roll-back a transaction.

Inherited Methods

Inherited From Zend_Db_Adapter_Abstract

 Zend_Db_Adapter_Abstract::__construct()
 Zend_Db_Adapter_Abstract::beginTransaction()
 Zend_Db_Adapter_Abstract::closeConnection()
 Zend_Db_Adapter_Abstract::commit()
 Zend_Db_Adapter_Abstract::delete()
 Zend_Db_Adapter_Abstract::describeTable()
 Zend_Db_Adapter_Abstract::fetchAll()
 Zend_Db_Adapter_Abstract::fetchAssoc()
 Zend_Db_Adapter_Abstract::fetchCol()
 Zend_Db_Adapter_Abstract::fetchOne()
 Zend_Db_Adapter_Abstract::fetchPairs()
 Zend_Db_Adapter_Abstract::fetchRow()
 Zend_Db_Adapter_Abstract::foldCase()
 Zend_Db_Adapter_Abstract::getConnection()
 Zend_Db_Adapter_Abstract::getFetchMode()
 Zend_Db_Adapter_Abstract::getProfiler()
 Zend_Db_Adapter_Abstract::getQuoteIdentifierSymbol()
 Zend_Db_Adapter_Abstract::insert()
 Zend_Db_Adapter_Abstract::lastInsertId()
 Zend_Db_Adapter_Abstract::lastSequenceId()
 Zend_Db_Adapter_Abstract::limit()
 Zend_Db_Adapter_Abstract::listTables()
 Zend_Db_Adapter_Abstract::nextSequenceId()
 Zend_Db_Adapter_Abstract::prepare()
 Zend_Db_Adapter_Abstract::query()
 Zend_Db_Adapter_Abstract::quote()
 Zend_Db_Adapter_Abstract::quoteColumnAs()
 Zend_Db_Adapter_Abstract::quoteIdentifier()
 Zend_Db_Adapter_Abstract::quoteInto()
 Zend_Db_Adapter_Abstract::quoteTableAs()
 Zend_Db_Adapter_Abstract::rollBack()
 Zend_Db_Adapter_Abstract::select()
 Zend_Db_Adapter_Abstract::setFetchMode()
 Zend_Db_Adapter_Abstract::update()
 Zend_Db_Adapter_Abstract::_beginTransaction()
 Zend_Db_Adapter_Abstract::_checkRequiredOptions()
 Zend_Db_Adapter_Abstract::_commit()
 Zend_Db_Adapter_Abstract::_connect()
 Zend_Db_Adapter_Abstract::_quote()
 Zend_Db_Adapter_Abstract::_quoteIdentifier()
 Zend_Db_Adapter_Abstract::_quoteIdentifierAs()
 Zend_Db_Adapter_Abstract::_rollBack()
 Zend_Db_Adapter_Abstract::_whereExpr()

Documentation generated on Sun, 27 May 2007 23:20:02 -0700 by phpDocumentor 1.3.2