Extends PDO to simplify cross-database issues
package |
Query |
subpackage |
Query |
Methods
PDO constructor wrapper
__construct(string $dsn, string $username, string $password, array $driver_options)
Parameters
$dsn
string
$username
string
$password
string
$driver_options
array
__sleep()
__sleep()
inherited_from |
PDO::__sleep() |
__wakeup()
__wakeup()
inherited_from |
PDO::__wakeup() |
Returns number of rows affected by an INSERT, UPDATE, DELETE type query
affected_rows(\PDOStatement $statement) : int
beginTransaction()
beginTransaction()
inherited_from |
PDO::beginTransaction() |
commit()
commit()
inherited_from |
PDO::commit() |
Method to simplify retreiving db results for meta-data queries
driver_query(string $sql, bool $filtered_index) : mixed
Parameters
$sql
string
$filtered_index
bool
Returns
mixed
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
Parameters
$table
string
Returns
mixed
errorCode()
errorCode()
inherited_from |
PDO::errorCode() |
errorInfo()
errorInfo()
inherited_from |
PDO::errorInfo() |
exec()
exec()
inherited_from |
PDO::exec() |
getAttribute()
getAttribute()
inherited_from |
PDO::getAttribute() |
getAvailableDrivers()
getAvailableDrivers()
inherited_from |
PDO::getAvailableDrivers() |
Retrieve column information for the current database table
get_columns(string $table) : array
Parameters
$table
string
Returns
array
Return list of dbs for the current connection, if possible
get_dbs() : array
Return list of function for the current database
get_functions() : array
Return the last error for the current database connection
get_last_error() : string
Return list of stored procedures for the current database
get_procedures() : array
Retreives the data from a select query
get_query_data(\PDOStatement $statement) : array
Return schemas for databases that list them
get_schemas() : array
Return list of sequences for the current database, if they exist
get_sequences() : array
Retreives an array of non-user-created tables for
the connection/database
get_system_tables() : array
Return list of tables for the current database
get_tables() : array
Return list of triggers for the current database
get_triggers() : array
Retrieve list of data types for the database
get_types() : array
Return list of views for the current database
get_views() : array
inTransaction()
inTransaction()
inherited_from |
PDO::inTransaction() |
lastInsertId()
lastInsertId()
inherited_from |
PDO::lastInsertId() |
Return the number of rows returned for a SELECT query
num_rows() : int
prepare()
prepare()
inherited_from |
PDO::prepare() |
Create and execute a prepared statement with the provided parameters
prepare_execute(string $sql, array $params) : \PDOStatement
Parameters
$sql
string
$params
array
Returns
Simplifies prepared statements for database queries
prepare_query(string $sql, array $data) : mixed
Parameters
$sql
string
$data
array
Returns
mixed
PDOStatement / FALSE
query()
query()
inherited_from |
PDO::query() |
quote()
quote()
inherited_from |
PDO::quote() |
Surrounds the string with the databases identifier escape characters
quote_ident(mixed $ident) : string
Parameters
$ident
mixed
Returns
string
rollBack()
rollBack()
inherited_from |
PDO::rollBack() |
setAttribute()
setAttribute()
inherited_from |
PDO::setAttribute() |
Connect to a different database
switch_db(string $name) : void
Empty the passed table
truncate(string $table) : void
Helper method for quote_ident
_quote(mixed $str) : mixed
Parameters
$str
mixed
Returns
mixed
Properties
Reference to sql sub class
$sql : Object
Reference to util sub class
$util : Object
Character to escape identifiers
$escape_char : string
Reference to the last executed query
$statement : mixed