Firebird Database class

PDO-firebird isn't stable, so this is a wrapper of the fbird_ public functions.

package Query
subpackage Drivers

 Methods

Open the link to the database

__construct(string $dbpath, string $user, string $pass) 

Parameters

$dbpath

string

$user

string

$pass

string

__sleep()

__sleep() 
Inherited

inherited_from PDO::__sleep()
inherited_from \DB_PDO::__sleep()

__wakeup()

__wakeup() 
Inherited

inherited_from PDO::__wakeup()
inherited_from \DB_PDO::__wakeup()

Returns number of rows affected by an INSERT, UPDATE, DELETE type query

affected_rows(\PDOStatement $statement) : int
Inherited

inherited_from \DB_PDO::affected_rows()

Parameters

$statement

\PDOStatement

Returns

int

Start a database transaction

beginTransaction() : bool

Returns

bool

Commit a database transaction

commit() : bool

Returns

bool

Deletes all the rows from a table. Does the same as the truncate method if the database does not support 'TRUNCATE';

empty_table(string $table) : mixed
Inherited

inherited_from \DB_PDO::empty_table()

Parameters

$table

string

Returns

mixed

Method to emulate PDO->errorCode

errorCode() : array

Returns

array

Method to emulate PDO->errorInfo / PDOStatement->errorInfo

errorInfo() : array

Returns

array

exec()

exec() 
Inherited

inherited_from PDO::exec()
inherited_from \DB_PDO::exec()

getAttribute()

getAttribute() 
Inherited

inherited_from PDO::getAttribute()
inherited_from \DB_PDO::getAttribute()

getAvailableDrivers()

getAvailableDrivers() 
Inherited

inherited_from PDO::getAvailableDrivers()
inherited_from \DB_PDO::getAvailableDrivers()

Return list of dbs for the current connection, if possible

get_dbs() : array
Inherited

inherited_from \DB_PDO::get_dbs()

Returns

array

Return list of function for the current database

get_functions() : array
Inherited

inherited_from \DB_PDO::get_functions()

Returns

array

Return the last error for the current database connection

get_last_error() : string
Inherited

inherited_from \DB_PDO::get_last_error()

Returns

string

Return list of stored procedures for the current database

get_procedures() : array
Inherited

inherited_from \DB_PDO::get_procedures()

Returns

array

Retreives the data from a select query

get_query_data(\PDOStatement $statement) : array
Inherited

inherited_from \DB_PDO::get_query_data()

Parameters

$statement

\PDOStatement

Returns

array

Return schemas for databases that list them

get_schemas() : array
Inherited

inherited_from \DB_PDO::get_schemas()

Returns

array

Return list of sequences for the current database, if they exist

get_sequences() : array
Inherited

inherited_from \DB_PDO::get_sequences()

Returns

array

Retreives an array of non-user-created tables for the connection/database

get_system_tables() : array
Inherited

inherited_from \DB_PDO::get_system_tables()

Returns

array

Return list of tables for the current database

get_tables() : array
Inherited

inherited_from \DB_PDO::get_tables()

Returns

array

Return list of triggers for the current database

get_triggers() : array
Inherited

inherited_from \DB_PDO::get_triggers()

Returns

array

Return list of views for the current database

get_views() : array
Inherited

inherited_from \DB_PDO::get_views()

Returns

array

inTransaction()

inTransaction() 
Inherited

inherited_from PDO::inTransaction()
inherited_from \DB_PDO::inTransaction()

lastInsertId()

lastInsertId() 
Inherited

inherited_from PDO::lastInsertId()
inherited_from \DB_PDO::lastInsertId()

Return the number of rows returned for a SELECT query

num_rows() : int
Inherited

inherited_from \DB_PDO::num_rows()

Returns

int

Emulate PDO prepare

prepare(string $query, array $options) : \Firebird

fluent This method is part of a fluent interface and will return the same instance

Parameters

$query

string

$options

array

Returns

Prepare and execute a query

prepare_execute(string $sql, array $args) : resource

Parameters

$sql

string

$args

array

Returns

resource

Bind a prepared query with arguments for executing

prepare_query(string $sql, array $params) : FALSE

Parameters

$sql

string

$params

array

Returns

FALSE

Wrapper public function to better match PDO

query(string $sql) : \Firebird

fluent This method is part of a fluent interface and will return the same instance

Parameters

$sql

string

Returns

Method to emulate PDO->quote

quote(string $str, int $param_type) : string

Parameters

$str

string

$param_type

int

Returns

string

Surrounds the string with the databases identifier escape characters

quote_ident(mixed $ident) : string
Inherited

inherited_from \DB_PDO::quote_ident()

Parameters

$ident

mixed

Returns

string

Rollback a transaction

rollBack() : bool

Returns

bool

setAttribute()

setAttribute() 
Inherited

inherited_from PDO::setAttribute()
inherited_from \DB_PDO::setAttribute()

Doesn't apply to Firebird

switch_db(string $name) : FALSE

Parameters

$name

string

Returns

FALSE

Empty a database table

truncate(string $table) : void

Parameters

$table

string

Helper method for quote_ident

_quote(mixed $str) : mixed
Inherited

inherited_from \DB_PDO::_quote()

Parameters

$str

mixed

Returns

mixed

Method to simplify retreiving db results for meta-data queries

driver_query(string $sql, bool $filtered_index) : mixed
Inherited

inherited_from \DB_PDO::driver_query()

Parameters

$sql

string

$filtered_index

bool

Returns

mixed

 Properties

 

Reference to sql sub class

$sql : Object
Inherited

inherited_from \DB_PDO::$$sql
 

Reference to util sub class

$util : Object
Inherited

inherited_from \DB_PDO::$$util
 

Reference to the connection resource

$conn : resource

 

Character to escape identifiers

$escape_char : string
Inherited

inherited_from \DB_PDO::$$escape_char
 

Reference to the last query executed

$statement : object

   

Reference to the current transaction

$trans : resource