DboSybase Class Reference

Public Member Functions | |
| _execute ($sql) | |
| begin (&$model) | |
| column ($real) | |
| commit (&$model) | |
| connect () | |
| describe (&$model) | |
| disconnect () | |
| fetchResult () | |
| lastAffected () | |
| lastError () | |
| lastInsertId ($source=null) | |
| lastNumRows () | |
| listSources () | |
| resultSet (&$results) | |
| rollback (&$model) | |
| value ($data, $column=null, $safe=false) | |
Public Attributes | |
| $_baseConfig | |
| $columns | |
| $description = "Sybase DBO Driver" | |
| $endQuote = "" | |
| $startQuote = "" | |
Detailed Description
Definition at line 37 of file dbo_sybase.php.
Member Function Documentation
| DboSybase::_execute | ( | $ | sql | ) |
Executes given SQL statement.
- Parameters:
-
string $sql SQL statement
- Returns:
- resource Result resource identifier protected
Definition at line 123 of file dbo_sybase.php.
Referenced by listSources().
| DboSybase::begin | ( | &$ | model | ) |
Begin a transaction
- Parameters:
-
unknown_type $model
- Returns:
- boolean True on success, false on fail (i.e. if the database/model does not support transactions).
Reimplemented from DboSource.
Definition at line 224 of file dbo_sybase.php.
References DboSource::execute().
| DboSybase::column | ( | $ | real | ) |
Converts database-layer column types to basic types
- Parameters:
-
string $real Real database-layer column type (i.e. "varchar(255)")
- Returns:
- string Abstract column type (i.e. "string")
Reimplemented from DataSource.
Definition at line 311 of file dbo_sybase.php.
References DboSource::limit(), and DboSource::name().
Referenced by describe().
| DboSybase::commit | ( | &$ | model | ) |
Commit a transaction
- Parameters:
-
unknown_type $model
- Returns:
- boolean True on success, false on fail (i.e. if the database/model does not support transactions, or a transaction has not started).
Reimplemented from DboSource.
Definition at line 241 of file dbo_sybase.php.
References DboSource::execute().
| DboSybase::connect | ( | ) |
Connects to the database using options in the given configuration array.
- Returns:
- boolean True if the database could be connected, else false
Definition at line 92 of file dbo_sybase.php.
References DataSource::$config, and config().
| DboSybase::describe | ( | &$ | model | ) |
Returns an array of the fields in given table name.
- Parameters:
-
string $tableName Name of database table to inspect
- Returns:
- array Fields in table. Keys are name and type
Definition at line 157 of file dbo_sybase.php.
References column(), DboSource::fullTableName(), DboSource::length(), and DboSource::query().
| DboSybase::disconnect | ( | ) |
Disconnects from database.
- Returns:
- boolean True if the database could be disconnected, else false
Definition at line 112 of file dbo_sybase.php.
| DboSybase::fetchResult | ( | ) |
Fetches the next row from the current result set
- Returns:
- unknown
Definition at line 371 of file dbo_sybase.php.
References DboSource::$index.
| DboSybase::lastAffected | ( | ) |
Returns number of affected rows in previous database operation. If no previous operation exists, this returns false.
- Returns:
- integer Number of affected rows
Definition at line 277 of file dbo_sybase.php.
| DboSybase::lastError | ( | ) |
Returns a formatted error message from previous database operation.
- Todo:
- not implemented
- Returns:
- string Error message with error number
Definition at line 268 of file dbo_sybase.php.
| DboSybase::lastInsertId | ( | $ | source = null |
) |
Returns the ID generated from the previous INSERT operation.
- Parameters:
-
unknown_type $source
- Returns:
- in
Reimplemented from DataSource.
Definition at line 301 of file dbo_sybase.php.
References DboSource::fetchRow().
| DboSybase::lastNumRows | ( | ) |
Returns number of rows in previous resultset. If no previous resultset exists, this returns false.
- Returns:
- integer Number of rows in resultset
Definition at line 289 of file dbo_sybase.php.
References DboSource::hasResult().
| DboSybase::listSources | ( | ) |
Returns an array of sources (tables) in the database.
- Returns:
- array Array of tablenames in the database
Definition at line 131 of file dbo_sybase.php.
References _execute().
| DboSybase::resultSet | ( | &$ | results | ) |
Enter description here...
- Parameters:
-
unknown_type $results
Definition at line 348 of file dbo_sybase.php.
References DboSource::$index, and DboSource::name().
| DboSybase::rollback | ( | &$ | model | ) |
Rollback a transaction
- Parameters:
-
unknown_type $model
- Returns:
- boolean True on success, false on fail (i.e. if the database/model does not support transactions, or a transaction has not started).
Reimplemented from DboSource.
Definition at line 256 of file dbo_sybase.php.
References DboSource::execute().
| DboSybase::value | ( | $ | data, | |
| $ | column = null, |
|||
| $ | safe = false | |||
| ) |
Returns a quoted and escaped string of $data for use in an SQL statement.
- Parameters:
-
string $data String to be prepared for use in an SQL statement string $column The column into which this data will be inserted boolean $safe Whether or not numeric data should be handled automagically if no column data is provided
- Returns:
- string Quoted and escaped data
Definition at line 191 of file dbo_sybase.php.
References DboSource::boolean().
Member Data Documentation
| DboSybase::$_baseConfig |
Initial value:
array(
'persistent' => true,
'host' => 'localhost',
'login' => 'sa',
'password' => '',
'database' => 'cake',
'port' => '4100'
)
Reimplemented from DataSource.
Definition at line 61 of file dbo_sybase.php.
| DboSybase::$columns |
Initial value:
array(
'primary_key' => array('name' => 'numeric(9,0) IDENTITY PRIMARY KEY'),
'string' => array('name' => 'varchar', 'limit' => '255'),
'text' => array('name' => 'text'),
'integer' => array('name' => 'int', 'limit' => '11', 'formatter' => 'intval'),
'float' => array('name' => 'float', 'formatter' => 'floatval'),
'datetime' => array('name' => 'datetime', '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' => 'datetime', 'format' => 'H:i:s', 'formatter' => 'date'),
'date' => array('name' => 'datetime', 'format' => 'Y-m-d', 'formatter' => 'date'),
'binary' => array('name' => 'image'),
'boolean' => array('name' => 'bit')
)
Definition at line 74 of file dbo_sybase.php.
| DboSybase::$description = "Sybase DBO Driver" |
| DboSybase::$endQuote = "" |
| DboSybase::$startQuote = "" |
The documentation for this class was generated from the following file:
- 1.2.x.x/cake/libs/model/datasources/dbo/dbo_sybase.php