DboOdbc Class Reference

Inheritance diagram for DboOdbc:

DboSource DataSource Object

List of all members.


Public Member Functions

 _execute ($sql)
 begin (&$model)
 boolean ($data)
 column ($real)
 commit (&$model)
 connect ()
describe (&$model)
 disconnect ()
 fetchResult ()
 lastAffected ()
 lastError ()
 lastInsertId ($source=null)
 lastNumRows ()
 listSources ()
 name ($data)
 resultSet (&$results)
 rollback (&$model)
 value ($data, $column=null)

Public Attributes

 $_baseConfig
 $columns = array()
 $description = "ODBC DBO Driver"
 $endQuote = "`"
 $startQuote = "`"

Detailed Description

Definition at line 39 of file dbo_odbc.php.


Member Function Documentation

DboOdbc::_execute ( sql  ) 

Executes given SQL statement.

Parameters:
string $sql SQL statement
Returns:
resource Result resource identifier protected

Definition at line 128 of file dbo_odbc.php.

DboOdbc::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 267 of file dbo_odbc.php.

DboOdbc::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

Parameters:
mixed $data Value to be translated
Returns:
mixed Converted boolean value

Reimplemented from DboSource.

Definition at line 244 of file dbo_odbc.php.

DboOdbc::column ( real  ) 

Enter description here...

Parameters:
string $real Real database-layer column type (i.e. "varchar(255)")

Reimplemented from DataSource.

Definition at line 371 of file dbo_odbc.php.

References DboSource::limit(), and name().

DboOdbc::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 286 of file dbo_odbc.php.

DboOdbc::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 99 of file dbo_odbc.php.

References DataSource::$config, and config().

& DboOdbc::describe ( &$  model  ) 

Returns an array of the fields in given table name.

Parameters:
Model $model Model object to describe
Returns:
array Fields in table. Keys are name and type

Definition at line 166 of file dbo_odbc.php.

References DboSource::fullTableName().

DboOdbc::disconnect (  ) 

Disconnects from database.

Returns:
boolean True if the database could be disconnected, else false

Definition at line 118 of file dbo_odbc.php.

DboOdbc::fetchResult (  ) 

Fetches the next row from the current result set

Returns:
unknown

Definition at line 420 of file dbo_odbc.php.

References DboSource::$index.

DboOdbc::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 333 of file dbo_odbc.php.

DboOdbc::lastError (  ) 

Returns a formatted error message from previous database operation.

Returns:
string Error message with error number

Definition at line 319 of file dbo_odbc.php.

DboOdbc::lastInsertId ( source = null  ) 

Returns the ID generated from the previous INSERT operation.

Parameters:
unknown_type $source
Returns:
int

Reimplemented from DataSource.

Definition at line 361 of file dbo_odbc.php.

References DboSource::fetchRow().

DboOdbc::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 347 of file dbo_odbc.php.

DboOdbc::listSources (  ) 

Returns an array of sources (tables) in the database.

Returns:
array Array of tablenames in the database

Definition at line 136 of file dbo_odbc.php.

DboOdbc::name ( data  ) 

Returns a quoted name of $data for use in an SQL statement. Strips fields out of SQL functions before quoting.

Parameters:
string $data
Returns:
string SQL field

Reimplemented from DboSource.

Definition at line 192 of file dbo_odbc.php.

References $pos.

Referenced by column(), and resultSet().

DboOdbc::resultSet ( &$  results  ) 

Enter description here...

Parameters:
unknown_type $results

Definition at line 390 of file dbo_odbc.php.

References DboSource::$index, and name().

DboOdbc::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 305 of file dbo_odbc.php.

DboOdbc::value ( data,
column = null 
)

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
Returns:
string Quoted and escaped
Todo:
Add logic that formats/escapes data based on column type

Reimplemented from DboSource.

Definition at line 215 of file dbo_odbc.php.


Member Data Documentation

DboOdbc::$_baseConfig

Initial value:

 array('persistent' => true,
                'login' => 'root',
                'password' => '',
                'database' => 'cake',
                'connect'  => 'odbc_pconnect'
    )

Reimplemented from DataSource.

Definition at line 67 of file dbo_odbc.php.

DboOdbc::$columns = array()

Definition at line 80 of file dbo_odbc.php.

DboOdbc::$description = "ODBC DBO Driver"

Reimplemented from DboSource.

Definition at line 46 of file dbo_odbc.php.

DboOdbc::$endQuote = "`"

Reimplemented from DboSource.

Definition at line 60 of file dbo_odbc.php.

DboOdbc::$startQuote = "`"

Reimplemented from DboSource.

Definition at line 53 of file dbo_odbc.php.


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