Methods

Returns a database cache object

cache(array $result, string $sql, mixed $as_object) : \Fuel\Core\Database_Cached

Parameters

$result

array

$sql

string

$as_object

mixed

Returns

\Fuel\Core\Database_Cached

Connects to the database

connect() 

Exceptions

\Database_Exception

Resolve a datatype

datatype(integer $type) : array

Parameters

$type

integer

Returns

array

disconnect()

disconnect() : bool

Returns

bool

Get the current PDO Driver name

driver_name() : string

Returns

string

Retrieve error info

error_info() : array

Returns

array

Escape a value

escape(mixed $value) : string

Parameters

$value

mixed

Returns

string

List table columns

list_columns(string $table, string $like) : array

Parameters

$table

string

$like

string

Returns

array

List indexes

list_indexes($table, string $like) 

Parameters

$table

$like

string

Exceptions

\FuelException

List tables

list_tables(string $like) 

Parameters

$like

string

Exceptions

\FuelException

Query the database

query(integer $type, string $sql, mixed $as_object) : mixed

Parameters

$type

integer

$sql

string

$as_object

mixed

Exceptions

\Database_Exception

Returns

mixed

Set the charset

set_charset(string $charset) 

Parameters

$charset

string

__construct()

__construct(string $name, array $config) 

Parameters

$name

string

$config

array

Create a new PDO instance

_connect() : \Fuel\Core\PDO

Returns

\Fuel\Core\PDO

Commit a transaction

driver_commit() : bool

Returns

bool

Rollback a transaction

driver_rollback() : bool

Returns

bool

Start a transaction

driver_start_transaction() : bool

Returns

bool

Release savepoint of the transaction

release_savepoint(string $name) : boolean

Parameters

$name

string

name of the savepoint

Returns

booleantrue - savepoint was set successfully; false - failed to set savepoint; null - RDBMS does not support savepoints

Rollback savepoint of the transaction

rollback_savepoint(string $name) : boolean

Parameters

$name

string

name of the savepoint

Returns

booleantrue - savepoint was set successfully; false - failed to set savepoint; null - RDBMS does not support savepoints

Sets savepoint of the transaction

set_savepoint(string $name) : boolean

Parameters

$name

string

name of the savepoint

Returns

booleantrue - savepoint was set successfully; false - failed to set savepoint; null - RDBMS does not support savepoints

 Properties

 

<p>raw server connection</p>

$_connection : \PDO

 

<p>PDO uses no quoting by default for identifiers</p>

$_identifier : string