Public Member Functions | Protected Attributes

Zend_Db_Adapter_Pdo_Ibm_Db2 Class Reference

Public Member Functions

 __construct ($adapter)
 listTables ()
 describeTable ($tableName, $schemaName=null)
 limit ($sql, $count, $offset=0)
 lastSequenceId ($sequenceName)
 nextSequenceId ($sequenceName)

Protected Attributes

 $_adapter = null

Detailed Description

Definition at line 38 of file Db2.php.


Constructor & Destructor Documentation

__construct ( adapter )

Construct the data server class.

It will be used to generate non-generic SQL for a particular data server

Parameters:
Zend_Db_Adapter_Abstract$adapter

Definition at line 53 of file Db2.php.


Member Function Documentation

describeTable ( tableName,
schemaName = null 
)

DB2 catalog lookup for describe table

Parameters:
string$tableName
string$schemaNameOPTIONAL
Returns:
array

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.

Definition at line 77 of file Db2.php.

lastSequenceId ( sequenceName )

DB2-specific last sequence id

Parameters:
string$sequenceName
Returns:
integer

Definition at line 209 of file Db2.php.

limit ( sql,
count,
offset = 0 
)

Adds a DB2-specific LIMIT clause to the SELECT statement.

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

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

Definition at line 166 of file Db2.php.

listTables (  )

Returns a list of the tables in the database.

Returns:
array

Definition at line 63 of file Db2.php.

nextSequenceId ( sequenceName )

DB2-specific sequence id value

Parameters:
string$sequenceName
Returns:
integer

Definition at line 222 of file Db2.php.


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