Public Member Functions | |
_connect () | |
prepare ($sql) | |
listTables () | |
describeTable ($tableName, $schemaName=null) | |
insert ($table, array $bind) | |
limit ($sql, $count, $offset=0) | |
lastInsertId ($tableName=null, $primaryKey=null) | |
lastSequenceId ($sequenceName) | |
nextSequenceId ($sequenceName) | |
getServerVersion () | |
Protected Member Functions | |
_dsn () | |
_checkRequiredOptions (array $config) | |
Protected Attributes | |
$_pdoType = 'ibm' | |
$_serverType = null | |
$_numericDataTypes |
Definition at line 44 of file Ibm.php.
_checkRequiredOptions | ( | array $ | config ) | [protected] |
Checks required options
array | $config |
Zend_Db_Adapter_Exception |
Reimplemented from Zend_Db_Adapter_Abstract.
_connect | ( | ) |
Creates a PDO object and connects to the database.
The IBM data server is set. Current options are DB2 or IDS
Zend_Db_Adapter_Exception |
Reimplemented from Zend_Db_Adapter_Pdo_Abstract.
_dsn | ( | ) | [protected] |
Creates a PDO DSN for the adapter from $this->_config settings.
Reimplemented from Zend_Db_Adapter_Pdo_Abstract.
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
string | $tableName | |
string | $schemaName | OPTIONAL |
Reimplemented from Zend_Db_Adapter_Abstract.
getServerVersion | ( | ) |
Retrieve server version in PHP style Pdo_Idm doesn't support getAttribute(PDO::ATTR_SERVER_VERSION)
Reimplemented from Zend_Db_Adapter_Pdo_Abstract.
insert | ( | $ | table, |
array $ | bind | ||
) |
Inserts a table row with specified data. Special handling for PDO_IBM remove empty slots
mixed | $table | The table to insert data into. |
array | $bind | Column-value pairs. |
Reimplemented from Zend_Db_Adapter_Abstract.
lastInsertId | ( | $ | tableName = null , |
$ | primaryKey = null |
||
) |
Gets the last ID generated automatically by an IDENTITY/AUTOINCREMENT column.
string | $tableName | OPTIONAL |
string | $primaryKey | OPTIONAL |
Reimplemented from Zend_Db_Adapter_Pdo_Abstract.
lastSequenceId | ( | $ | sequenceName ) |
Return the most recent value from the specified sequence in the database.
string | $sequenceName |
Reimplemented from Zend_Db_Adapter_Abstract.
limit | ( | $ | sql, |
$ | count, | ||
$ | offset = 0 |
||
) |
Adds an adapter-specific LIMIT clause to the SELECT statement.
string | $sql | |
integer | $count | |
integer | $offset | OPTIONAL |
Reimplemented from Zend_Db_Adapter_Abstract.
listTables | ( | ) |
Returns a list of the tables in the database.
Reimplemented from Zend_Db_Adapter_Abstract.
nextSequenceId | ( | $ | sequenceName ) |
Generate a new value from the specified sequence in the database, and return it.
string | $sequenceName |
Reimplemented from Zend_Db_Adapter_Abstract.
prepare | ( | $ | sql ) |
Prepares an SQL statement.
string | $sql | The SQL statement with placeholders. |
array | $bind | An array of data to bind to the placeholders. |
Reimplemented from Zend_Db_Adapter_Pdo_Abstract.
$_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, 'INTEGER' => Zend_Db::INT_TYPE, 'SMALLINT' => Zend_Db::INT_TYPE, 'BIGINT' => Zend_Db::BIGINT_TYPE, 'DECIMAL' => Zend_Db::FLOAT_TYPE, 'DEC' => Zend_Db::FLOAT_TYPE, 'REAL' => Zend_Db::FLOAT_TYPE, 'NUMERIC' => Zend_Db::FLOAT_TYPE, 'DOUBLE PRECISION' => Zend_Db::FLOAT_TYPE, 'FLOAT' => Zend_Db::FLOAT_TYPE )
Reimplemented from Zend_Db_Adapter_Abstract.