Public Member Functions | |
getTransaction () | |
listTables () | |
describeTable ($tableName, $schemaName=null) | |
closeConnection () | |
prepare ($sql) | |
lastInsertId ($tableName=null, $primaryKey=null) | |
setFetchMode ($mode) | |
limit ($sql, $count, $offset=0) | |
quoteTableAs ($ident, $alias=null, $auto=false) | |
lastSequenceId ($sequenceName) | |
nextSequenceId ($sequenceName) | |
supportsParameters ($type) | |
isConnected () | |
getServerVersion () | |
Protected Member Functions | |
_quote ($value) | |
_formatDbConnString ($host, $port, $dbname) | |
_connect () | |
_beginTransaction () | |
_commit () | |
_rollBack () | |
Protected Attributes | |
$_autoQuoteIdentifiers = true | |
$_transResource = null | |
$_numericDataTypes |
Definition at line 51 of file Firebird.php.
_beginTransaction | ( | ) | [protected] |
Begin a transaction.
Reimplemented from Zend_Db_Adapter_Abstract.
Definition at line 387 of file Firebird.php.
_commit | ( | ) | [protected] |
Commit a transaction.
Reimplemented from Zend_Db_Adapter_Abstract.
Definition at line 402 of file Firebird.php.
_connect | ( | ) | [protected] |
Creates a connection to the database.
ZendX_Db_Adapter_Firebird_Exception |
Reimplemented from Zend_Db_Adapter_Abstract.
Definition at line 277 of file Firebird.php.
_formatDbConnString | ( | $ | host, |
$ | port, | ||
$ | dbname | ||
) | [protected] |
Format a connection string to connect to database
Definition at line 260 of file Firebird.php.
_quote | ( | $ | value ) | [protected] |
Quote a raw string.
string | $value | Raw string |
Reimplemented from Zend_Db_Adapter_Abstract.
Definition at line 114 of file Firebird.php.
_rollBack | ( | ) | [protected] |
Roll-back a transaction.
Reimplemented from Zend_Db_Adapter_Abstract.
Definition at line 419 of file Firebird.php.
closeConnection | ( | ) |
Force the connection to close.
Reimplemented from Zend_Db_Adapter_Abstract.
Definition at line 318 of file Firebird.php.
describeTable | ( | $ | tableName, |
$ | schemaName = null |
||
) |
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
string | $tableName | |
string | $schemaName | OPTIONAL |
Use FETCH_NUM so we are not dependent on the CASE attribute of the PDO connection
Firebird does not support auto-increment keys.
Reimplemented from Zend_Db_Adapter_Abstract.
Definition at line 164 of file Firebird.php.
getServerVersion | ( | ) |
Retrieve server version in PHP style
Reimplemented from Zend_Db_Adapter_Abstract.
Definition at line 579 of file Firebird.php.
getTransaction | ( | ) |
isConnected | ( | ) |
Test if a connection is active
Reimplemented from Zend_Db_Adapter_Abstract.
Definition at line 568 of file Firebird.php.
lastInsertId | ( | $ | tableName = null , |
$ | primaryKey = null |
||
) |
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.
string | $tableName | OPTIONAL Name of table. |
string | $primaryKey | OPTIONAL Name of primary key column. |
ZendX_Db_Adapter_Firebird_Exception |
Reimplemented from Zend_Db_Adapter_Abstract.
Definition at line 367 of file Firebird.php.
lastSequenceId | ( | $ | sequenceName ) |
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.
string | $sequenceName |
Reimplemented from Zend_Db_Adapter_Abstract.
Definition at line 522 of file Firebird.php.
limit | ( | $ | sql, |
$ | count, | ||
$ | offset = 0 |
||
) |
Adds an adapter-specific LIMIT clause to the SELECT statement.
string | $sql | |
integer | $count | |
integer | $offset |
Zend_Db_Adapter_Exception |
Reimplemented from Zend_Db_Adapter_Abstract.
Definition at line 467 of file Firebird.php.
listTables | ( | ) |
Returns a list of the tables in the database.
Reimplemented from Zend_Db_Adapter_Abstract.
Definition at line 128 of file Firebird.php.
nextSequenceId | ( | $ | sequenceName ) |
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.
string | $sequenceName |
Reimplemented from Zend_Db_Adapter_Abstract.
Definition at line 538 of file Firebird.php.
prepare | ( | $ | sql ) |
Prepare a statement and return a Statement resource.
string | $sql | SQL query |
Reimplemented from Zend_Db_Adapter_Abstract.
Definition at line 337 of file Firebird.php.
quoteTableAs | ( | $ | ident, |
$ | alias = null , |
||
$ | auto = false |
||
) |
Quote a table identifier and alias.
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. |
Reimplemented from Zend_Db_Adapter_Abstract.
Definition at line 508 of file Firebird.php.
setFetchMode | ( | $ | mode ) |
Set the fetch mode.
int | $mode |
Reimplemented from Zend_Db_Adapter_Abstract.
Definition at line 437 of file Firebird.php.
supportsParameters | ( | $ | type ) |
Check if the adapter supports real SQL parameters.
string | $type | 'positional' or 'named' |
Reimplemented from Zend_Db_Adapter_Abstract.
Definition at line 552 of file Firebird.php.
$_numericDataTypes [protected] |
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 )
Reimplemented from Zend_Db_Adapter_Abstract.
Definition at line 92 of file Firebird.php.