\Query\DriverDriver_Interface

PDO Interface to implement for database drivers

Summary

Methods
Constants
__construct()
beginTransaction()
commit()
errorCode()
errorInfo()
exec()
getAttribute()
rollback()
setAttribute()
No constants found
No protected methods found
N/A
No private methods found
N/A

Methods

__construct()

__construct(string $dsn, \Query\Driver\[string] $username, \Query\Driver\[string] $password, \Query\Driver\[array] $driver_options) : void

Constructor/Connection method

Parameters

string $dsn
\Query\Driver\[string] $username
\Query\Driver\[string] $password
\Query\Driver\[array] $driver_options

beginTransaction()

beginTransaction() : bool

Begin a transaction

Returns

bool

commit()

commit() : bool

Commit a transaction

Returns

bool

errorCode()

errorCode() : mixed

Return the current error code

Returns

mixed

errorInfo()

errorInfo() : array

Return information about the current error

Returns

array

exec()

exec(string $statement) : int

Execute an SQL statement and return the number of affected rows

Parameters

string $statement

Returns

int

getAttribute()

getAttribute(int $attribute)

Get a connection attribute for the current db driver

Parameters

int $attribute

rollback()

rollback() : bool

Rollback a transaction

Returns

bool

setAttribute()

setAttribute(int $attribute, mixed $value) : bool

Set a connection attribute

Parameters

int $attribute
mixed $value

Returns

bool