PHP Class CI_DB_odbc_driver, TastyIgniter

Note: _DB is an extender class that the app controller creates dynamically based on whether the active record class is being used or not.
Author: ExpressionEngine Dev Team
Inheritance: extends CI_DB
Datei anzeigen Open project: tastyigniter/tastyigniter

Public Properties

Property Type Description
$dbdriver string Database driver
$schema string Database schema

Protected Properties

Property Type Description
$_escape_char string Must be empty for ODBC.
$_like_escape_str string ESCAPE statement string
$_random_keyword array ORDER BY random keyword

Public Methods

Method Description
__construct ( array $params ) : void Class constructor
affected_rows ( ) : integer Affected Rows
db_connect ( boolean $persistent = FALSE ) : resource Non-persistent database connection
error ( ) : array Error
insert_id ( ) : boolean Insert ID
is_write_type ( $sql ) : boolean Determines if a query is a "write" type.

Protected Methods

Method Description
_close ( ) : void Close DB Connection
_delete ( string $table ) : string Delete statement
_escape_str ( $str ) : string Platform-dependant string escape
_execute ( string $sql ) : resource Execute the query
_field_data ( string $table ) : string Field data query
_list_columns ( string $table = '' ) : string Show column query
_list_tables ( boolean $prefix_limit = FALSE ) : string Show table query
_trans_begin ( ) : boolean Begin Transaction
_trans_commit ( ) : boolean Commit Transaction
_trans_rollback ( ) : boolean Rollback Transaction
_truncate ( string $table ) : string Truncate statement
_update ( string $table, array $values ) : string Update statement

Method Details

__construct() public method

Class constructor
public __construct ( array $params ) : void
$params array
return void

_close() protected method

Close DB Connection
protected _close ( ) : void
return void

_delete() protected method

Generates a platform-specific delete string from the supplied data
protected _delete ( string $table ) : string
$table string
return string

_escape_str() protected method

Platform-dependant string escape
protected _escape_str ( $str ) : string
return string

_execute() protected method

Execute the query
protected _execute ( string $sql ) : resource
$sql string an SQL query
return resource

_field_data() protected method

Generates a platform-specific query so that the column data can be retrieved
protected _field_data ( string $table ) : string
$table string
return string

_list_columns() protected method

Generates a platform-specific query string so that the column names can be fetched
protected _list_columns ( string $table = '' ) : string
$table string
return string

_list_tables() protected method

Generates a platform-specific query string so that the table names can be fetched
protected _list_tables ( boolean $prefix_limit = FALSE ) : string
$prefix_limit boolean
return string

_trans_begin() protected method

Begin Transaction
protected _trans_begin ( ) : boolean
return boolean

_trans_commit() protected method

Commit Transaction
protected _trans_commit ( ) : boolean
return boolean

_trans_rollback() protected method

Rollback Transaction
protected _trans_rollback ( ) : boolean
return boolean

_truncate() protected method

Generates a platform-specific truncate string from the supplied data If the database does not support the TRUNCATE statement, then this method maps to 'DELETE FROM table'
protected _truncate ( string $table ) : string
$table string
return string

_update() protected method

Generates a platform-specific update string from the supplied data
protected _update ( string $table, array $values ) : string
$table string
$values array
return string

affected_rows() public method

Affected Rows
public affected_rows ( ) : integer
return integer

db_connect() public method

Non-persistent database connection
public db_connect ( boolean $persistent = FALSE ) : resource
$persistent boolean
return resource

error() public method

Returns an array containing code and message of the last database error that has occured.
public error ( ) : array
return array

insert_id() public method

Insert ID
public insert_id ( ) : boolean
return boolean

is_write_type() public method

Determines if a query is a "write" type.
public is_write_type ( $sql ) : boolean
return boolean

Property Details

$_escape_char protected_oe property

Must be empty for ODBC.
protected string $_escape_char
return string

$_like_escape_str protected_oe property

ESCAPE statement string
protected string $_like_escape_str
return string

$_random_keyword protected_oe property

ORDER BY random keyword
protected array $_random_keyword
return array

$dbdriver public_oe property

Database driver
public string $dbdriver
return string

$schema public_oe property

Database schema
public string $schema
return string