PHP Class CI_DB_pdo_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: EllisLab Dev Team
Inheritance: extends CI_DB
Afficher le fichier Open project: tastyigniter/tastyigniter Class Usage Examples

Méthodes publiques

Свойство Type Description
$dbdriver string Database driver
$options array PDO Options

Méthodes publiques

Méthode Description
__construct ( array $params ) : void Class constructor
affected_rows ( ) : integer Affected Rows
db_connect ( boolean $persistent = FALSE ) : object Database connection
error ( ) : array Error
insert_id ( string $name = NULL ) : integer Insert ID
version ( ) : string Database version number

Méthodes protégées

Méthode Description
_escape_str ( $str ) : string Platform-dependant string escape
_execute ( string $sql ) : mixed Execute the query
_field_data ( string $table ) : string Field data query
_trans_begin ( ) : boolean Begin Transaction
_trans_commit ( ) : boolean Commit Transaction
_trans_rollback ( ) : boolean Rollback Transaction
_truncate ( string $table ) : string Truncate statement
_update_batch ( string $table, array $values, string $index ) : string Update_Batch statement

Method Details

__construct() public méthode

Validates the DSN string and/or detects the subdriver.
public __construct ( array $params ) : void
$params array
Résultat void

_escape_str() protected méthode

Platform-dependant string escape
protected _escape_str ( $str ) : string
Résultat string

_execute() protected méthode

Execute the query
protected _execute ( string $sql ) : mixed
$sql string SQL query
Résultat mixed

_field_data() protected méthode

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

_trans_begin() protected méthode

Begin Transaction
protected _trans_begin ( ) : boolean
Résultat boolean

_trans_commit() protected méthode

Commit Transaction
protected _trans_commit ( ) : boolean
Résultat boolean

_trans_rollback() protected méthode

Rollback Transaction
protected _trans_rollback ( ) : boolean
Résultat boolean

_truncate() protected méthode

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
Résultat string

_update_batch() protected méthode

Generates a platform-specific batch update string from the supplied data
protected _update_batch ( string $table, array $values, string $index ) : string
$table string Table name
$values array Update data
$index string WHERE key
Résultat string

affected_rows() public méthode

Affected Rows
public affected_rows ( ) : integer
Résultat integer

db_connect() public méthode

Database connection
public db_connect ( boolean $persistent = FALSE ) : object
$persistent boolean
Résultat object

error() public méthode

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

insert_id() public méthode

Insert ID
public insert_id ( string $name = NULL ) : integer
$name string
Résultat integer

version() public méthode

Database version number
public version ( ) : string
Résultat string

Property Details

$dbdriver public_oe property

Database driver
public string $dbdriver
Résultat string

$options public_oe property

PDO Options
public array $options
Résultat array