Abstract Class Zend_Db_Adapter_Pdo_Abstract

Description

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

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

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

Zend_Db_Adapter_Abstract
   |
   --Zend_Db_Adapter_Pdo_Abstract
Direct descendents
Class Description
 class Zend_Db_Adapter_Pdo_Mysql Class for connecting to MySQL databases and performing common operations.
 class Zend_Db_Adapter_Pdo_Mssql Class for connecting to Microsoft SQL Server 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.
 class Zend_Db_Adapter_Pdo_Ibm
 class Zend_Db_Adapter_Pdo_Oci Class for connecting to Oracle databases and performing common operations.
Variable Summary
Method Summary
 void closeConnection ()
 string getServerVersion ()
 boolean isConnected ()
 string lastInsertId ([string $tableName = null], [string $primaryKey = null])
 PDOStatement prepare (string $sql, array $bind)
 Zend_Db_Statement_Pdo query (string|Zend_Db_Select $sql, [array $bind = array()])
 void setFetchMode (int $mode)
 bool supportsParameters (string $type)
 void _commit ()
 void _connect ()
 string _dsn ()
 string _quote (string $value)
 void _rollBack ()
Variables
Methods
closeConnection (line 163)

Force the connection to close.

  • access: public
void closeConnection ()

Redefinition of:
Zend_Db_Adapter_Abstract::closeConnection()
Force the connection to close.
getServerVersion (line 340)

Retrieve server version in PHP style

  • access: public
string getServerVersion ()

Redefinition of:
Zend_Db_Adapter_Abstract::getServerVersion()
Retrieve server version in PHP style

Redefined in descendants as:
isConnected (line 153)

Test if a connection is active

  • access: public
boolean isConnected ()

Redefinition of:
Zend_Db_Adapter_Abstract::isConnected()
Test if a connection is active
lastInsertId (line 202)

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
string 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 175)

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.

Redefined in descendants as:
query (line 217)

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_Statement_Pdo 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 290)

Set the PDO fetch mode.

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

Redefinition of:
Zend_Db_Adapter_Abstract::setFetchMode()
Set the fetch mode.
supportsParameters (line 325)

Check if the adapter supports real SQL parameters.

  • access: public
bool supportsParameters (string $type)
  • string $type: 'positional' or 'named'

Redefinition of:
Zend_Db_Adapter_Abstract::supportsParameters()
Check if the adapter supports real SQL parameters.
_beginTransaction (line 258)

Begin a transaction.

  • access: protected
void _beginTransaction ()

Redefinition of:
Zend_Db_Adapter_Abstract::_beginTransaction()
Begin a transaction.

Redefined in descendants as:
_commit (line 267)

Commit a transaction.

  • access: protected
void _commit ()

Redefinition of:
Zend_Db_Adapter_Abstract::_commit()
Commit a transaction.

Redefined in descendants as:
_connect (line 91)

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 66)

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

  • access: protected
string _dsn ()

Redefined in descendants as:
_quote (line 246)

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 276)

Roll-back a transaction.

  • access: protected
void _rollBack ()

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

Redefined in descendants as:

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::getConfig()
 Zend_Db_Adapter_Abstract::getConnection()
 Zend_Db_Adapter_Abstract::getFetchMode()
 Zend_Db_Adapter_Abstract::getProfiler()
 Zend_Db_Adapter_Abstract::getQuoteIdentifierSymbol()
 Zend_Db_Adapter_Abstract::getServerVersion()
 Zend_Db_Adapter_Abstract::getStatementClass()
 Zend_Db_Adapter_Abstract::insert()
 Zend_Db_Adapter_Abstract::isConnected()
 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::setProfiler()
 Zend_Db_Adapter_Abstract::setStatementClass()
 Zend_Db_Adapter_Abstract::supportsParameters()
 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 Fri, 08 Jan 2010 17:11:07 -0500 by phpDocumentor 1.4.3