Class Zend_Test_DbAdapter

Description

Testing Database Adapter which acts as a stack for SQL Results

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

Located in /Test/DbAdapter.php (line 47)

Zend_Db_Adapter_Abstract
   |
   --Zend_Test_DbAdapter
Variable Summary
Method Summary
 Zend_Test_DbAdapter __construct ()
 void closeConnection ()
 array describeTable (string $tableName, [string $schemaName = null])
 string getServerVersion ()
 boolean isConnected ()
 string lastInsertId ([string $tableName = null], [string $primaryKey = null])
 string limit (mixed $sql, integer $count, [integer $offset = 0])
 array listTables ()
 Zend_Db_Statment|PDOStatement prepare (string|Zend_Db_Select $sql)
 Zend_Test_DbAdapter setDescribeTable (string $table, array $tableInfo)
 void setFetchMode (integer $mode)
 void setListTables ( $listTables)
 void setQuoteIdentifierSymbol ( $symbol)
 bool supportsParameters (string $type)
 void _commit ()
 void _connect ()
 void _rollBack ()
Variables
boolean $_connected = false (line 57)
  • access: protected
array $_describeTables = array() (line 72)
  • access: protected
array $_lastInsertIdStack = array() (line 67)
  • access: protected
array $_listTables = array() (line 62)
  • access: protected
string $_quoteIdentifierSymbol = '' (line 77)
  • access: protected
array $_statementStack = array() (line 52)
  • access: protected

Inherited Variables

Inherited from Zend_Db_Adapter_Abstract

Zend_Db_Adapter_Abstract::$_allowSerialization
Zend_Db_Adapter_Abstract::$_autoQuoteIdentifiers
Zend_Db_Adapter_Abstract::$_autoReconnectOnUnserialize
Zend_Db_Adapter_Abstract::$_caseFolding
Zend_Db_Adapter_Abstract::$_config
Zend_Db_Adapter_Abstract::$_connection
Zend_Db_Adapter_Abstract::$_defaultProfilerClass
Zend_Db_Adapter_Abstract::$_defaultStmtClass
Zend_Db_Adapter_Abstract::$_fetchMode
Zend_Db_Adapter_Abstract::$_numericDataTypes
Zend_Db_Adapter_Abstract::$_profiler
Methods
Constructor __construct (line 82)

Empty constructor to make it parameterless.

  • access: public
Zend_Test_DbAdapter __construct ()

Redefinition of:
Zend_Db_Adapter_Abstract::__construct()
Constructor.
appendLastInsertIdToStack (line 107)

Append a new Insert Id to the {@see lastInsertId}.

  • access: public
Zend_Test_DbAdapter appendLastInsertIdToStack (int|string $id)
  • int|string $id
appendStatementToStack (line 95)

Append a new Statement to the SQL Result Stack.

  • access: public
Zend_Test_DbAdapter appendStatementToStack (Zend_Test_DbStatement $stmt)
closeConnection (line 224)

Force the connection to close.

  • access: public
void closeConnection ()

Redefinition of:
Zend_Db_Adapter_Abstract::closeConnection()
Force the connection to close.
describeTable (line 190)

Returns the column descriptions for a table.

The return value is an associative array keyed by the column name, as returned by the RDBMS.

The value of each array element is an associative array with the following keys:

SCHEMA_NAME => string; name of database or schema TABLE_NAME => string; COLUMN_NAME => string; column name COLUMN_POSITION => number; ordinal position of column in table DATA_TYPE => string; SQL datatype name of column DEFAULT => string; default expression of column, null if none NULLABLE => boolean; true if column can have nulls LENGTH => number; length of CHAR/VARCHAR SCALE => number; scale of NUMERIC/DECIMAL PRECISION => number; precision of NUMERIC/DECIMAL UNSIGNED => boolean; unsigned property of an integer type PRIMARY => boolean; true if column is part of the primary key PRIMARY_POSITION => integer; position of column in primary key

  • access: public
array describeTable (string $tableName, [string $schemaName = null])
  • string $tableName
  • string $schemaName: OPTIONAL

Redefinition of:
Zend_Db_Adapter_Abstract::describeTable()
Returns the column descriptions for a table.
getQuoteIdentifierSymbol (line 126)

Returns the symbol the adapter uses for delimited identifiers.

  • access: public
string getQuoteIdentifierSymbol ()

Redefinition of:
Zend_Db_Adapter_Abstract::getQuoteIdentifierSymbol()
Returns the symbol the adapter uses for delimited identifiers.
getServerVersion (line 341)

Retrieve server version in PHP style

string getServerVersion ()

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

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

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.

  • 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.
limit (line 320)

Adds an adapter-specific LIMIT clause to the SELECT statement.

  • access: public
string limit (mixed $sql, integer $count, [integer $offset = 0])
  • mixed $sql
  • integer $count
  • integer $offset

Redefinition of:
Zend_Db_Adapter_Abstract::limit()
Adds an adapter-specific LIMIT clause to the SELECT statement.
listTables (line 146)

Returns a list of the tables in the database.

  • access: public
array listTables ()

Redefinition of:
Zend_Db_Adapter_Abstract::listTables()
Returns a list of the tables in the database.
prepare (line 235)

Prepare a statement and return a PDOStatement-like object.

  • access: public
Zend_Db_Statment|PDOStatement prepare (string|Zend_Db_Select $sql)

Redefinition of:
Zend_Db_Adapter_Abstract::prepare()
Prepare a statement and return a PDOStatement-like object.
setDescribeTable (line 157)
  • access: public
Zend_Test_DbAdapter setDescribeTable (string $table, array $tableInfo)
  • string $table
  • array $tableInfo
setFetchMode (line 307)

Set the fetch mode.

  • throws: Zend_Db_Adapter_Exception
  • access: public
void setFetchMode (integer $mode)
  • integer $mode

Redefinition of:
Zend_Db_Adapter_Abstract::setFetchMode()
Set the fetch mode.
setListTables (line 136)

Set the result from {@see listTables()}.

  • access: public
void setListTables ( $listTables)
  • array $listTables
setQuoteIdentifierSymbol (line 116)
  • access: public
void setQuoteIdentifierSymbol ( $symbol)
  • $symbol
supportsParameters (line 331)

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

Begin a transaction.

  • access: protected
void _beginTransaction ()

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

Commit a transaction.

  • access: protected
void _commit ()

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

Creates a connection to the database.

  • access: protected
void _connect ()

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

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::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()
 Zend_Db_Adapter_Abstract::__sleep()
 Zend_Db_Adapter_Abstract::__wakeup()

Documentation generated on Mon, 21 Jun 2010 15:16:05 -0400 by phpDocumentor 1.4.3