Inheritance diagram for DboDb2:

Public Member Functions | |
| _execute ($sql) | |
| begin (&$model) | |
| boolean ($data) | |
| column ($real) | |
| commit (&$model) | |
| connect () | |
| & | describe (&$model) |
| disconnect () | |
| fetchResult () | |
| lastAffected () | |
| lastError () | |
| lastInsertId ($source=null) | |
| lastNumRows () | |
| limit ($limit, $offset=null) | |
| listSources () | |
| name ($data) | |
| resultSet (&$results, $sql=null) | |
| rollback (&$model) | |
| update (&$model, $fields=array(), $values=array()) | |
| value ($data, $column=null, $safe=false) | |
Public Attributes | |
| $_baseConfig | |
| $_resultMap = array() | |
| $columns | |
| $description = 'IBM DB2 DBO Driver' | |
| $endQuote = '' | |
| $startQuote = '' | |
Definition at line 39 of file dbo_db2.php.
| DboDb2::_execute | ( | $ | sql | ) |
Executes given SQL statement. We should use prepare / execute to allow the database server to reuse its access plan and increase the efficiency of your database access
| string | $sql SQL statement |
Definition at line 158 of file dbo_db2.php.
References DboSource::$index.
Referenced by connect().
| DboDb2::begin | ( | &$ | model | ) |
Begins a transaction. Returns true if the transaction was started successfully, otherwise false.
| unknown_type | $model |
Reimplemented from DboSource.
Definition at line 311 of file dbo_db2.php.
| DboDb2::boolean | ( | $ | data | ) |
Not sure about this one, MySQL needs it but does ODBC? Safer just to leave it Translates between PHP boolean values and MySQL (faked) boolean values
| mixed | $data Value to be translated |
Reimplemented from DboSource.
Definition at line 290 of file dbo_db2.php.
Referenced by value().
| DboDb2::column | ( | $ | real | ) |
Converts database-layer column types to basic types
| string | $real Real database-layer column type (i.e. "varchar(255)") |
Reimplemented from DataSource.
Definition at line 470 of file dbo_db2.php.
References limit(), and name().
Referenced by describe().
| DboDb2::commit | ( | &$ | model | ) |
Commit a transaction
| unknown_type | $model |
Reimplemented from DboSource.
Definition at line 328 of file dbo_db2.php.
| DboDb2::connect | ( | ) |
Connects to the database using options in the given configuration array.
Definition at line 108 of file dbo_db2.php.
References DataSource::$config, _execute(), and config().
| & DboDb2::describe | ( | &$ | model | ) |
Returns an array of the fields in given table name.
Definition at line 214 of file dbo_db2.php.
References DataSource::__cacheDescription(), column(), DboSource::fullTableName(), and DboSource::length().
| DboDb2::disconnect | ( | ) |
Disconnects from database.
Definition at line 144 of file dbo_db2.php.
| DboDb2::fetchResult | ( | ) |
Fetches the next row from the current result set Maps the records in the $result property to the map created in resultSet().
2. Gets the actual values.
Definition at line 548 of file dbo_db2.php.
References DboSource::$index.
| DboDb2::lastAffected | ( | ) |
Returns number of affected rows in previous database operation. If no previous operation exists, this returns false.
Definition at line 393 of file dbo_db2.php.
| DboDb2::lastError | ( | ) |
Returns a formatted error message from previous database operation. DB2 distinguishes between statement and connnection errors so we must check for both.
Definition at line 379 of file dbo_db2.php.
| DboDb2::lastInsertId | ( | $ | source = null |
) |
Returns the ID generated from the previous INSERT operation.
| unknown_type | $source |
Reimplemented from DataSource.
Definition at line 417 of file dbo_db2.php.
References DboSource::fetchRow().
| DboDb2::lastNumRows | ( | ) |
Returns number of rows in previous resultset. If no previous resultset exists, this returns false.
Definition at line 405 of file dbo_db2.php.
| DboDb2::limit | ( | $ | limit, | |
| $ | offset = null | |||
| ) |
Returns a limit statement in the correct format for the particular database.
| integer | $limit Limit of results returned | |
| integer | $offset Offset from which to start results |
Reimplemented from DboSource.
Definition at line 432 of file dbo_db2.php.
Referenced by column().
| DboDb2::listSources | ( | ) |
Returns an array of all the tables in the database. Should call parent::listSources twice in the method: once to see if the list is cached, and once to cache the list if not.
Definition at line 193 of file dbo_db2.php.
| DboDb2::name | ( | $ | data | ) |
Returns a quoted name of $data for use in an SQL statement.
| string | $data Name (table.field) to be prepared for use in an SQL statement |
Reimplemented from DboSource.
Definition at line 240 of file dbo_db2.php.
Referenced by column().
| DboDb2::resultSet | ( | &$ | results, | |
| $ | sql = null | |||
| ) |
Maps a result set to an array so that returned fields are grouped by model. Any calculated fields, or fields that do not correspond to a particular model belong under array key 0.
1. Gets the column headers {{{ Post.id Post.title
[0] => Array ( [0] => Post [1] => id )
[1] => Array ( [0] => Post [1] => title ) }}}
| unknown_type | $results |
Definition at line 535 of file dbo_db2.php.
| DboDb2::rollback | ( | &$ | model | ) |
Rollback a transaction
| unknown_type | $model |
Reimplemented from DboSource.
Definition at line 346 of file dbo_db2.php.
| DboDb2::update | ( | &$ | model, | |
| $ | fields = array(), |
|||
| $ | values = array() | |||
| ) |
Removes Identity (primary key) column from update data before returning to parent
| Model | $model | |
| array | $fields | |
| array | $values |
Reimplemented from DataSource.
Definition at line 362 of file dbo_db2.php.
| DboDb2::value | ( | $ | data, | |
| $ | column = null, |
|||
| $ | safe = false | |||
| ) |
Returns a quoted and escaped string of $data for use in an SQL statement.
| string | $data String to be prepared for use in an SQL statement | |
| string | $column The column into which this data will be inserted |
Reimplemented from DboSource.
Definition at line 251 of file dbo_db2.php.
References boolean().
| DboDb2::$_baseConfig |
Initial value:
array(
'persistent' => true,
'login' => 'db2inst1',
'password' => '',
'database' => 'cake',
'schema' => '',
'hostname' => '127.0.0.1',
'port' => '50001',
'encoding' => 'UTF-8',
'cataloged' => true,
'autocommit' => true
)
Reimplemented from DataSource.
Definition at line 64 of file dbo_db2.php.
| DboDb2::$_resultMap = array() |
Definition at line 102 of file dbo_db2.php.
| DboDb2::$columns |
Initial value:
array(
'primary_key' => array('name' => 'not null generated by default as identity (start with 1, increment by 1)'),
'string' => array('name' => 'varchar', 'limit' => '255'),
'text' => array('name' => 'clob'),
'integer' => array('name' => 'integer', 'limit' => '10', 'formatter' => 'intval'),
'float' => array('name' => 'double', 'formatter' => 'floatval'),
'datetime' => array('name' => 'timestamp', 'format' => 'Y-m-d-H.i.s', 'formatter' => 'date'),
'timestamp' => array('name' => 'timestamp', 'format' => 'Y-m-d-H.i.s', 'formatter' => 'date'),
'time' => array('name' => 'time', 'format' => 'H.i.s', 'formatter' => 'date'),
'date' => array('name' => 'date', 'format' => 'Y-m-d', 'formatter' => 'date'),
'binary' => array('name' => 'blob'),
'boolean' => array('name' => 'smallint', 'limit' => '1')
)
Definition at line 84 of file dbo_db2.php.
| DboDb2::$description = 'IBM DB2 DBO Driver' |
| DboDb2::$endQuote = '' |
| DboDb2::$startQuote = '' |
1.4.7