Public Member Functions | Protected Member Functions | Protected Attributes

ZendX_Db_Adapter_Firebird Class Reference

Inheritance diagram for ZendX_Db_Adapter_Firebird:
Zend_Db_Adapter_Abstract

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

Detailed Description

Definition at line 51 of file Firebird.php.


Member Function Documentation

_beginTransaction (  ) [protected]

Begin a transaction.

Returns:
void

Reimplemented from Zend_Db_Adapter_Abstract.

Definition at line 387 of file Firebird.php.

_commit (  ) [protected]

Commit a transaction.

Returns:
void

See also:
ZendX_Db_Adapter_Firebird_Exception

Reimplemented from Zend_Db_Adapter_Abstract.

Definition at line 402 of file Firebird.php.

_connect (  ) [protected]

Creates a connection to the database.

Returns:
void
Exceptions:
ZendX_Db_Adapter_Firebird_Exception

See also:
ZendX_Db_Adapter_Firebird_Exception
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

Returns:
void

Definition at line 260 of file Firebird.php.

_quote ( value ) [protected]

Quote a raw string.

Parameters:
string$valueRaw string
Returns:
string Quoted string

Reimplemented from Zend_Db_Adapter_Abstract.

Definition at line 114 of file Firebird.php.

_rollBack (  ) [protected]

Roll-back a transaction.

Returns:
void

See also:
ZendX_Db_Adapter_Firebird_Exception

Reimplemented from Zend_Db_Adapter_Abstract.

Definition at line 419 of file Firebird.php.

closeConnection (  )

Force the connection to close.

Returns:
void

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

Parameters:
string$tableName
string$schemaNameOPTIONAL
Returns:
array

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

Returns:
string

Reimplemented from Zend_Db_Adapter_Abstract.

Definition at line 579 of file Firebird.php.

getTransaction (  )

Return the status of current transaction.

Returns:
bool

Definition at line 76 of file Firebird.php.

isConnected (  )

Test if a connection is active

Returns:
boolean

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.

Parameters:
string$tableNameOPTIONAL Name of table.
string$primaryKeyOPTIONAL Name of primary key column.
Returns:
string
Exceptions:
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.

Parameters:
string$sequenceName
Returns:
string

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.

Parameters:
string$sql
integer$count
integer$offset
Exceptions:
Zend_Db_Adapter_Exception
Returns:
string

See also:
ZendX_Db_Adapter_Firebird_Exception
ZendX_Db_Adapter_Firebird_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.

Returns:
array

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.

Parameters:
string$sequenceName
Returns:
integer

Reimplemented from Zend_Db_Adapter_Abstract.

Definition at line 538 of file Firebird.php.

prepare ( sql )

Prepare a statement and return a Statement resource.

Parameters:
string$sqlSQL query
Returns:
ZendX_Db_Statement_Firebird

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.

Parameters:
string | array | Zend_Db_Expr$identThe identifier or expression.
string$aliasAn alias for the table.
boolean$autoIf true, heed the AUTO_QUOTE_IDENTIFIERS config option.
Returns:
string The quoted identifier and alias.

Reimplemented from Zend_Db_Adapter_Abstract.

Definition at line 508 of file Firebird.php.

setFetchMode ( mode )

Set the fetch mode.

Parameters:
int$mode
Returns:
void

See also:
ZendX_Db_Adapter_Firebird_Exception

Reimplemented from Zend_Db_Adapter_Abstract.

Definition at line 437 of file Firebird.php.

supportsParameters ( type )

Check if the adapter supports real SQL parameters.

Parameters:
string$type'positional' or 'named'
Returns:
bool

Reimplemented from Zend_Db_Adapter_Abstract.

Definition at line 552 of file Firebird.php.


Field Documentation

$_numericDataTypes [protected]
Initial value:
 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.


The documentation for this class was generated from the following file: