## ZendX_Db_Adapter_Firebird

Description

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

Located in /Db/Adapter/Firebird.php (line 51)

    Zend_Db_Adapter_Abstract
       |
       --ZendX_Db_Adapter_Firebird

Variable Summary
bool $_autoQuoteIdentifiers
array $_numericDataTypes
transaction $_transResource
Method Summary
void closeConnection ()
array describeTable (string $tableName, [string $schemaName = null])
string getServerVersion ()
bool getTransaction ()
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 ()
integer nextSequenceId (string $sequenceName)
ZendX_Db_Statement_Firebird prepare (string $sql)
string quoteTableAs (string|array|Zend_Db_Expr $ident, [string $alias = null], [boolean $auto = false])
void setFetchMode (int $mode)
bool supportsParameters (string $type)
void _beginTransaction ()
void _commit ()
void _connect ()
void _formatDbConnString ( $host, $port, $dbname)
string _quote (string $value)
void _rollBack ()
Variables
bool $_autoQuoteIdentifiers = true (line 62)

Specifies whether the adapter automatically quotes identifiers.

If true, most SQL generated by Zend_Db classes applies identifier quoting automatically. If false, developer must quote identifiers themselves by calling quoteIdentifier().

- 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,
'SMALLINT' => Zend_Db::INT_TYPE,
'INT' => Zend_Db::INT_TYPE,
'INTEGER' => Zend_Db::INT_TYPE,
'BIGINT' => Zend_Db::BIGINT_TYPE,
'INT64' => Zend_Db::BIGINT_TYPE,
'DECIMAL' => Zend_Db::FLOAT_TYPE,
'DOUBLE PRECISION' => Zend_Db::FLOAT_TYPE,
'DOUBLE' => Zend_Db::FLOAT_TYPE,
'NUMERIC' => Zend_Db::FLOAT_TYPE,
'FLOAT' => Zend_Db::FLOAT_TYPE
) (line 92)

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

transaction $_transResource = null (line 69)

The transaction resource.

- access: protected

Methods
closeConnection (line 318)

Force the connection to close.

- access: public

void closeConnection ()
describeTable (line 164)

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

- access: public

array describeTable (string $tableName, [string $schemaName = null])

- string $tableName
- string $schemaName: OPTIONAL

getServerVersion (line 579)

Retrieve server version in PHP style

- access: public

string getServerVersion ()
getTransaction (line 76)

Return the status of current transaction.

- access: public

bool getTransaction ()
isConnected (line 568)

Test if a connection is active

- access: public

boolean isConnected ()
lastInsertId (line 367)

Gets the last ID generated automatically by an IDENTITY/AUTOINCREMENT column.

As a convention, on RDBMS brands that support sequences (e.g. Firebird, 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.

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

- throws: ZendX_Db_Adapter_Firebird_Exception
- access: public

string lastInsertId ([string $tableName = null], [string $primaryKey = null])

- string $tableName: OPTIONAL Name of table.
- string $primaryKey: OPTIONAL Name of primary key column.

lastSequenceId (line 522)

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

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

- access: public

string lastSequenceId (string $sequenceName)

- string $sequenceName

limit (line 467)

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

- throws: Zend_Db_Adapter_Exception
- access: public

string limit (string $sql, integer $count, [integer $offset = 0])

- string $sql
- integer $count
- integer $offset

listTables (line 128)

Returns a list of the tables in the database.

- access: public

array listTables ()
nextSequenceId (line 538)

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. Firebird, Oracle, PostgreSQL, DB2). Other RDBMS brands return null.

- access: public

integer nextSequenceId (string $sequenceName)

- string $sequenceName

prepare (line 337)

Prepare a statement and return a Statement resource.

- access: public

ZendX_Db_Statement_Firebird prepare (string $sql)

- string $sql: SQL query

quoteTableAs (line 508)

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.

setFetchMode (line 437)

Set the fetch mode.

- access: public

void setFetchMode (int $mode)

- int $mode

supportsParameters (line 552)

Check if the adapter supports real SQL parameters.

- access: public

bool supportsParameters (string $type)

- string $type: 'positional' or 'named'

_beginTransaction (line 387)

Begin a transaction.

- access: protected

void _beginTransaction ()
_commit (line 402)

Commit a transaction.

- access: protected

void _commit ()
_connect (line 277)

Creates a connection to the database.

- throws: ZendX_Db_Adapter_Firebird_Exception
- access: protected

void _connect ()
_formatDbConnString (line 260)

Format a connection string to connect to database

- access: protected

void _formatDbConnString ( $host, $port, $dbname)

- $host
- $port
- $dbname

_quote (line 114)

Quote a raw string.

- return: Quoted string
- access: protected

string _quote (string $value)

- string $value: Raw string

_rollBack (line 419)

Roll-back a transaction.

- access: protected

void _rollBack ()

Documentation generated on Sat, 14 Feb 2009 13:36:22 +0300 by phpDocumentor 1.4.2