Zend Framework
1.12
|
Public Member Functions | |
__construct ($adapter) | |
Construct the data server class. | |
listTables () | |
Returns a list of the tables in the database. | |
describeTable ($tableName, $schemaName=null) | |
DB2 catalog lookup for describe table. | |
limit ($sql, $count, $offset=0) | |
Adds a DB2-specific LIMIT clause to the SELECT statement. | |
lastSequenceId ($sequenceName) | |
DB2-specific last sequence id. | |
nextSequenceId ($sequenceName) | |
DB2-specific sequence id value. | |
Protected Attributes | |
$_adapter = null | |
__construct | ( | $adapter | ) |
Construct the data server class.
It will be used to generate non-generic SQL for a particular data server
Zend_Db_Adapter_Abstract | $adapter |
describeTable | ( | $tableName, | |
$schemaName = null |
|||
) |
DB2 catalog lookup for describe table.
string | $tableName | |
string | $schemaName | OPTIONAL |
To avoid case issues, fetch using FETCH_NUM
The ordering of columns is defined by the query so we can map to variables to improve readability
In IBM DB2, an column can be IDENTITY even if it is not part of the PRIMARY KEY.
lastSequenceId | ( | $sequenceName | ) |
DB2-specific last sequence id.
string | $sequenceName |
limit | ( | $sql, | |
$count, | |||
$offset = 0 |
|||
) |
Adds a DB2-specific LIMIT clause to the SELECT statement.
string | $sql | |
integer | $count | |
integer | $offset | OPTIONAL |
Zend_Db_Adapter_Exception |
DB2 does not implement the LIMIT clause as some RDBMS do. We have to simulate it with subqueries and ROWNUM. Unfortunately because we use the column wildcard "*", this puts an extra column into the query result set.
listTables | ( | ) |
Returns a list of the tables in the database.
nextSequenceId | ( | $sequenceName | ) |
DB2-specific sequence id value.
string | $sequenceName |
|
protected |