PHP Class CI_DB_postgre_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
Afficher le fichier Open project: tastyigniter/tastyigniter Class Usage Examples

Méthodes publiques

Свойство Type Description
$dbdriver string Database driver
$schema string Database schema

Protected Properties

Свойство Type Description
$_random_keyword array ORDER BY random keyword

Méthodes publiques

Méthode Description
__construct ( array $params ) : void Class constructor
affected_rows ( ) : integer Affected Rows
db_connect ( boolean $persistent = FALSE ) : resource Database connection
error ( ) : array Error
escape ( string $str ) : mixed "Smart" Escape String
field_data ( string $table ) : array Returns an object with field data
insert_id ( ) : string Insert ID
is_write_type ( $sql ) : boolean Determines if a query is a "write" type.
order_by ( string $orderby, string $direction = '', boolean $escape = NULL ) : object ORDER BY
reconnect ( ) : void Reconnect
version ( ) : string Database version number

Méthodes protégées

Méthode Description
_close ( ) : void Close DB Connection
_db_set_charset ( string $charset ) : boolean Set client character set
_delete ( string $table ) : string Delete statement
_escape_str ( $str ) : string Platform-dependant string escape
_execute ( string $sql ) : resource Execute the query
_limit ( string $sql ) : string LIMIT
_list_columns ( string $table = '' ) : string List 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
_update ( string $table, array $values ) : string Update statement
_update_batch ( string $table, array $values, string $index ) : string Update_Batch statement

Method Details

__construct() public méthode

Creates a DSN string to be used for db_connect() and db_pconnect()
public __construct ( array $params ) : void
$params array
Résultat void

_close() protected méthode

Close DB Connection
protected _close ( ) : void
Résultat void

_db_set_charset() protected méthode

Set client character set
protected _db_set_charset ( string $charset ) : boolean
$charset string
Résultat boolean

_delete() protected méthode

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

_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 ) : resource
$sql string an SQL query
Résultat resource

_limit() protected méthode

Generates a platform-specific LIMIT clause
protected _limit ( string $sql ) : string
$sql string SQL Query
Résultat string

_list_columns() protected méthode

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

_list_tables() protected méthode

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

_update() protected méthode

Generates a platform-specific update string from the supplied data
protected _update ( string $table, array $values ) : string
$table string
$values array
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 ) : resource
$persistent boolean
Résultat resource

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

escape() public méthode

Escapes data based on type
public escape ( string $str ) : mixed
$str string
Résultat mixed

field_data() public méthode

Returns an object with field data
public field_data ( string $table ) : array
$table string
Résultat array

insert_id() public méthode

Insert ID
public insert_id ( ) : string
Résultat string

is_write_type() public méthode

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

order_by() public méthode

ORDER BY
public order_by ( string $orderby, string $direction = '', boolean $escape = NULL ) : object
$orderby string
$direction string ASC, DESC or RANDOM
$escape boolean
Résultat object

reconnect() public méthode

Keep / reestablish the db connection if no queries have been sent for a length of time exceeding the server's idle timeout
public reconnect ( ) : void
Résultat void

version() public méthode

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

Property Details

$_random_keyword protected_oe property

ORDER BY random keyword
protected array $_random_keyword
Résultat array

$dbdriver public_oe property

Database driver
public string $dbdriver
Résultat string

$schema public_oe property

Database schema
public string $schema
Résultat string