Class Zend_Db_Adapter_Oracle

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

Located in /Db/Adapter/Oracle.php (line 44)

Zend_Db_Adapter_Abstract
   |
   --Zend_Db_Adapter_Oracle
Variable Summary
Method Summary
 void closeConnection ()
 array describeTable (string $tableName, [string $schemaName = null])
 boolean getLobAsString ()
 string getServerVersion ()
 int insert (mixed $table,  $bind)
 boolean isConnected ()
 string lastInsertId ([string $tableName = null], [string $primaryKey = null])
 string lastSequenceId (string $sequenceName)
 string limit (string $sql, integer $count, [integer $offset = 0])
 array listTables ()
 string nextSequenceId (string $sequenceName)
 string quoteTableAs (string|array|Zend_Db_Expr $ident, [string $alias = null], [boolean $auto = false])
 void setFetchMode (integer $mode)
 Zend_Db_Adapter_Oracle setLobAsString ( $lobAsString, string $lob_as_string)
 bool supportsParameters (string $type)
 int update (mixed $table,  $bind, [array|string $where = ''])
 void _commit ()
 void _connect ()
 string _quote (string $value)
 void _rollBack ()
Variables
array $_config = array(
'dbname' => null,
'username' => null,
'password' => null,
)
(line 58)

User-provided configuration.

Basic keys are:

username => (string) Connect to the database as this username. password => (string) Password associated with the username. dbname => Either the name of the local Oracle instance, or the name of the entry in tnsnames.ora to which you want to connect.

  • access: protected

Redefinition of:
Zend_Db_Adapter_Abstract::$_config
User-provided configuration
string $_defaultStmtClass = 'Zend_Db_Statement_Oracle' (line 94)

Default class name for a DB statement.

  • access: protected

Redefinition of:
Zend_Db_Adapter_Abstract::$_defaultStmtClass
Default class name for a DB statement.
integer $_execute_mode = OCI_COMMIT_ON_SUCCESS (line 87)
  • access: protected
boolean $_lobAsString = null (line 102)

Check if LOB field are returned as string instead of OCI-Lob object

  • access: protected
array $_numericDataTypes = array(
Zend_Db::INT_TYPE => Zend_Db::INT_TYPE,
Zend_Db::BIGINT_TYPE => Zend_Db::BIGINT_TYPE,
Zend_Db::FLOAT_TYPE => Zend_Db::FLOAT_TYPE,
'BINARY_DOUBLE' => Zend_Db::FLOAT_TYPE,
'BINARY_FLOAT' => Zend_Db::FLOAT_TYPE,
'NUMBER' => Zend_Db::FLOAT_TYPE,
)
(line 75)

Keys are UPPERCASE SQL datatypes or the constants Zend_Db::INT_TYPE, Zend_Db::BIGINT_TYPE, or Zend_Db::FLOAT_TYPE.

Values are:

  1. = 32-bit integer
  2. = 64-bit integer
  3. = float or decimal

  • var: Associative array of datatypes to values 0, 1, or 2.
  • access: protected

Redefinition of:
Zend_Db_Adapter_Abstract::$_numericDataTypes
Keys are UPPERCASE SQL datatypes or the constants Zend_Db::INT_TYPE, Zend_Db::BIGINT_TYPE, or Zend_Db::FLOAT_TYPE.

Inherited Variables

Inherited from Zend_Db_Adapter_Abstract

Zend_Db_Adapter_Abstract::$_autoQuoteIdentifiers
Zend_Db_Adapter_Abstract::$_caseFolding
Zend_Db_Adapter_Abstract::$_connection
Zend_Db_Adapter_Abstract::$_defaultProfilerClass
Zend_Db_Adapter_Abstract::$_fetchMode
Zend_Db_Adapter_Abstract::$_profiler
Methods
closeConnection (line 162)

Force the connection to close.

  • access: public
void closeConnection ()

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

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 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 IDENTITY => integer; true if column is auto-generated with unique values

  • todo: Discover integer unsigned property.
  • 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.
getLobAsString (line 187)

Return whether or not LOB are returned as string

  • access: public
boolean getLobAsString ()
getServerVersion (line 710)

Retrieve server version in PHP style

  • access: public
string getServerVersion ()

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

Inserts a table row with specified data.

Oracle does not support anonymous ('?') binds.

  • return: The number of affected rows.
  • access: public
int insert (mixed $table,  $bind)
  • mixed $table: The table to insert data into.
  • array $bind: Column-value pairs.

Redefinition of:
Zend_Db_Adapter_Abstract::insert()
Inserts a table row with specified data.
isConnected (line 151)

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

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.

Oracle does not support IDENTITY columns, so if the sequence is not specified, this method returns null.

  • 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.
lastSequenceId (line 257)

Return the most recent value from the specified sequence in the database.

This is supported only on RDBMS brands that support sequences (e.g. Oracle, PostgreSQL, DB2). Other RDBMS brands return null.

  • access: public
string lastSequenceId (string $sequenceName)
  • string $sequenceName

Redefinition of:
Zend_Db_Adapter_Abstract::lastSequenceId()
Return the most recent value from the specified sequence in the database.
limit (line 539)

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

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

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

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.
nextSequenceId (line 273)

Generate a new value from the specified sequence in the database, and return it.

This is supported only on RDBMS brands that support sequences (e.g. Oracle, PostgreSQL, DB2). Other RDBMS brands return null.

  • access: public
string nextSequenceId (string $sequenceName)
  • string $sequenceName

Redefinition of:
Zend_Db_Adapter_Abstract::nextSequenceId()
Generate a new value from the specified sequence in the database, and return it.
prepare (line 207)

Returns an SQL statement for preparation.

  • access: public
Zend_Db_Statement_Oracle prepare (string $sql)
  • string $sql: The SQL statement with placeholders.

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

Quote a table identifier and alias.

  • return: The quoted identifier and alias.
  • access: public
string quoteTableAs (string|array|Zend_Db_Expr $ident, [string $alias = null], [boolean $auto = false])
  • string|array|Zend_Db_Expr $ident: The identifier or expression.
  • string $alias: An alias for the table.
  • boolean $auto: If true, heed the AUTO_QUOTE_IDENTIFIERS config option.

Redefinition of:
Zend_Db_Adapter_Abstract::quoteTableAs()
Quote a table identifier and alias.
setFetchMode (line 504)

Set the fetch mode.

  • todo: Support FETCH_CLASS and FETCH_INTO.
  • throws: Zend_Db_Adapter_Oracle_Exception
  • access: public
void setFetchMode (integer $mode)
  • integer $mode: A fetch mode.

Redefinition of:
Zend_Db_Adapter_Abstract::setFetchMode()
Set the fetch mode.
setLobAsString (line 176)

Activate/deactivate return of LOB as string

  • access: public
Zend_Db_Adapter_Oracle setLobAsString ( $lobAsString, string $lob_as_string)
  • string $lob_as_string
  • $lobAsString
supportsParameters (line 694)

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.
update (line 654)

Updates table rows with specified data based on a WHERE clause.

  • return: The number of affected rows.
  • access: public
int update (mixed $table,  $bind, [array|string $where = ''])
  • mixed $table: The table to update.
  • array $bind: Column-value pairs.
  • array|string $where: UPDATE WHERE clause(s).

Redefinition of:
Zend_Db_Adapter_Abstract::update()
Updates table rows with specified data based on a WHERE clause.
_beginTransaction (line 454)

Leave autocommit mode and begin a transaction.

  • access: protected
void _beginTransaction ()

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

Commit a transaction and return to autocommit mode.

  • throws: Zend_Db_Adapter_Oracle_Exception
  • access: protected
void _commit ()

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

Creates a connection resource.

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

Redefinition of:
Zend_Db_Adapter_Abstract::_connect()
Creates a connection to the database.
_getExecuteMode (line 601)
  • access: public
int _getExecuteMode ()
_quote (line 226)

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.
_rollBack (line 483)

Roll back a transaction and return to autocommit mode.

  • throws: Zend_Db_Adapter_Oracle_Exception
  • 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()

Documentation generated on Fri, 08 Jan 2010 17:26:52 -0500 by phpDocumentor 1.4.3