$connections
+$connections : array+
Map of named database connections
+ + +diff --git a/docs/classes/Query.BadDBDriverException.html b/docs/classes/Query.BadDBDriverException.html index fd7f016..57a3a79 100644 --- a/docs/classes/Query.BadDBDriverException.html +++ b/docs/classes/Query.BadDBDriverException.html @@ -1,100 +1,391 @@ - + +
- - - -Generic exception for bad drivers
-package | -Query | -
---|---|
subpackage | -Core | -
Generic exception for bad drivers
+ + +Connection manager class to manage connections for the +Query method
+ + +$instance : \Query\Connection_Manager+
Class instance variable
+ + +get_instance() : \Query\Connection_Manager+
Return a connection manager instance
+ + + + +get_connection(string|array|object $name) : \Query\Query_Builder
+ Returns the connection specified by the name given
+ + +string|array|object | +$name | ++ |
connect(\ArrayObject $params) : \Query\Query_Builder
+ Parse the passed parameters and return a connection
+ + +\ArrayObject | +$params | ++ |
Base Database class
+Extends PDO to simplify cross-database issues
+ +$sql : \Query\Driver\SQL_Interface+
Reference to sql class
+ + +$table : \Query\Table\Table_Builder+
Reference to table_builder class
+ + +parent for database manipulation subclasses
-package | -Query | -
---|---|
subpackage | -Drivers | -
limit(string $sql, int $limit, int $offset = FALSE
) : string
-
-string
-int
-int
-string
parent for database manipulation subclasses
+ + +Abstract class defining database / table creation methods
+ + +__construct(\Query\Driver\Driver_Interface $conn)
+ Save a reference to the connection object for later use
+ + +\Query\Driver\Driver_Interface | +$conn | ++ |
delete_table(string $name) : string
+ Drop the selected table
+ + +string | +$name | ++ |
+ todo + | ++ | +
---|
backup_structure() : string+
Return an SQL file with the database table structure
+ + + + ++ todo + | ++ | +
---|
backup_data() : string+
Return an SQL file with the database data as insert statements
+ + + + ++ todo + | ++ | +
---|
PDO Interface to implement for database drivers
+ + +todo | ++ | +
---|
__construct(string $dsn, \Query\Driver\[string] $username, \Query\Driver\[string] $password, \Query\Driver\[array] $driver_options) : void+
Constructor/Connection method
+ + +string | +$dsn | ++ |
\Query\Driver\[string] | +$username | ++ |
\Query\Driver\[string] | +$password | ++ |
\Query\Driver\[array] | +$driver_options | ++ |
+ todo + | ++ | +
---|
beginTransaction() : bool+
Begin a transaction
+ + + + ++ todo + | ++ | +
---|
+ todo + | ++ | +
---|
errorCode() : mixed+
Return the current error code
+ + + + ++ todo + | ++ | +
---|
errorInfo() : array+
Return information about the current error
+ + + + ++ todo + | ++ | +
---|
exec(string $statement) : int
+ Execute an SQL statement and return the number of affected rows
+ + +string | +$statement | ++ |
+ todo + | ++ | +
---|
getAttribute(int $attribute)
+ Get a connection attribute for the current db driver
+ + +int | +$attribute | ++ |
+ returm + | +
+ mixed + |
+
---|---|
+ todo + | ++ | +
+ todo + | ++ | +
---|
Firebird Database class
+PDO-firebird isn't stable, so this is a wrapper of the fbird_ public functions.
+ ++ todo + | ++ | +
---|
$sql : \Query\Driver\SQL_Interface+
Reference to sql class
+ + ++ todo + | ++ | +
---|
$util : \Query\Driver\DB_Util+
Reference to util class
+ + ++ todo + | ++ | +
---|
$table : \Query\Table\Table_Builder+
Reference to table_builder class
+ + ++ todo + | ++ | +
---|
+ todo + | ++ | +
---|
$table_prefix : string+
Prefix to apply to table names
+ + ++ todo + | ++ | +
---|
$statement : \Query\Driver\PDOStatement+
Reference to the last executed query
+ + ++ todo + | ++ | +
---|
$statement_link : resource+
Reference to the resource returned by +the last query executed
+ + ++ todo + | ++ | +
---|
+ todo + | ++ | +
---|
+ todo + | ++ | +
---|
+ todo + | ++ | +
---|
$escape_char : string+
Character to escape indentifiers
+ + ++ todo + | ++ | +
---|
__construct(string $dsn, string $username, string $password, array $driver_options)+
PDO constructor wrapper
+ + +string | +$dsn | ++ |
string | +$username | ++ |
string | +$password | ++ |
array | +$driver_options | ++ |
+ todo + | ++ | +
---|
+ codeCoverageIgnore + | ++ + | +
---|---|
+ todo + | ++ | +
get_service() : resource+
Return service handle
+ + + + ++ todo + | ++ | +
---|
truncate(string $table) : void
+ Empty the passed table
+ + +string | +$table | ++ |
+ todo + | ++ | +
---|
exec(string $sql) : int
+ Execute an sql statement and return number of affected rows
+ + +string | +$sql | ++ |
+ todo + | ++ | +
---|
getAttribute(int $attribute) : mixed
+ Implement for compatibility with PDO
+ + +int | +$attribute | ++ |
+ todo + | ++ | +
---|
inTransaction() : bool+
Return whether the current statement is in a transaction
+ + + + ++ todo + | ++ | +
---|
lastInsertId(string $name) : mixed
+ Returns the last value of the specified generator
+ + +string | +$name | ++ |
+ todo + | ++ | +
---|
query(string $sql) : \Query\Driver\Firebird_Result
+ Wrapper public function to better match PDO
+ + +string | +$sql | ++ |
+ todo + | ++ | +
---|
prepare(string $query, array $options) : \Query\Driver\Firebird_Result+
Emulate PDO prepare
+ + +string | +$query | ++ |
array | +$options | ++ |
+ todo + | ++ | +
---|
beginTransaction() : boolean|null+
Start a database transaction
+ + + + ++ todo + | ++ | +
---|
+ todo + | ++ | +
---|
+ todo + | ++ | +
---|
setAttribute(int $attribute, mixed $value) : bool+
Set a connection attribute
+ + +int | +$attribute | ++ |
mixed | +$value | ++ |
+ todo + | ++ | +
---|
prepare_execute(string $sql, array $params) : \PDOStatement+
Create and execute a prepared statement with the provided parameters
+ + +string | +$sql | ++ |
array | +$params | ++ |
+ todo + | ++ | +
---|
quote(string $str, int $param_type) : string+
Method to emulate PDO->quote
+ + +string | +$str | ++ |
int | +$param_type | ++ |
+ todo + | ++ | +
---|
errorInfo() : array+
Method to emulate PDO->errorInfo / PDOStatement->errorInfo
+ + + + ++ todo + | ++ | +
---|
errorCode() : array+
Method to emulate PDO->errorCode
+ + + + ++ todo + | ++ | +
---|
prepare_query(string $sql, array $data) : \PDOStatement+
Simplifies prepared statements for database queries
+ + +string | +$sql | ++ |
array | +$data | ++ |
| FALSE
++ todo + | ++ | +
---|
insert_batch(string $table, array $data) : array+
Create sql for batch insert
+ + +string | +$table | ++ |
array | +$data | ++ |
+ todo + | ++ | +
---|
__call(string $name, array $args)+
Allow invoke to work on table object
+ + +string | +$name | ++ |
array | +$args | ++ |
+ todo + | ++ | +
---|
affected_rows() : int+
Returns number of rows affected by an INSERT, UPDATE, DELETE type query
+ + + + ++ todo + | ++ | +
---|
prefix_table(string $table) : string
+ Prefixes a table if it is not already prefixed
+ + +string | +$table | ++ |
+ todo + | ++ | +
---|
quote_table(string $table) : string
+ Quote database table name, and set prefix
+ + +string | +$table | ++ |
+ todo + | ++ | +
---|
quote_ident(mixed $ident) : string
+ Surrounds the string with the databases identifier escape characters
+ + +mixed | +$ident | ++ |
+ todo + | ++ | +
---|
_quote(mixed $str) : mixed
+ Helper method for quote_ident
+ + +mixed | +$str | ++ |
+ todo + | ++ | +
---|
get_schemas() : array+
Return schemas for databases that list them
+ + + + ++ todo + | ++ | +
---|
get_tables() : array+
Return list of tables for the current database
+ + + + ++ todo + | ++ | +
---|
get_dbs() : array+
Return list of dbs for the current connection, if possible
+ + + + ++ todo + | ++ | +
---|
get_views() : array+
Return list of views for the current database
+ + + + ++ todo + | ++ | +
---|
get_sequences() : array+
Return list of sequences for the current database, if they exist
+ + + + ++ todo + | ++ | +
---|
get_functions() : array+
Return list of function for the current database
+ + + + ++ todo + | ++ | +
---|
get_procedures() : array+
Return list of stored procedures for the current database
+ + + + ++ todo + | ++ | +
---|
get_triggers() : array+
Return list of triggers for the current database
+ + + + ++ todo + | ++ | +
---|
get_system_tables() : array+
Retreives an array of non-user-created tables for +the connection/database
+ + + + ++ todo + | ++ | +
---|
get_columns(string $table) : array
+ Retrieve column information for the current database table
+ + +string | +$table | ++ |
+ todo + | ++ | +
---|
get_fks(string $table) : array
+ Retrieve foreign keys for the table
+ + +string | +$table | ++ |
+ todo + | ++ | +
---|
get_indexes(string $table) : array
+ Retrieve indexes for the table
+ + +string | +$table | ++ |
+ todo + | ++ | +
---|
get_types() : array+
Retrieve list of data types for the database
+ + + + ++ todo + | ++ | +
---|
driver_query(string|array|null $query, bool $filtered_index) : array+
Method to simplify retreiving db results for meta-data queries
+ + +string|array|null | +$query | ++ |
bool | +$filtered_index | ++ |
+ todo + | ++ | +
---|
num_rows() : int+
Return the number of rows returned for a SELECT query
+ + + + ++ todo + | ++ | +
---|
_prefix(string $str) : string
+ Sets the table prefix on the passed string
+ + +string | +$str | ++ |
+ todo + | ++ | +
---|
Firebird result class to emulate PDOStatement Class - only implements +data-fetching methods
+ + ++ todo + | ++ | +
---|
+ todo + | ++ | +
---|
+ todo + | ++ | +
---|
+ param + | ++ + | +
---|---|
+ todo + | ++ | +
$db : \Query\Driver\Firebird+
Reference to the db drive to de-duplicate error functions
+ + ++ todo + | ++ | +
---|
__construct(resource $link, \Query\Driver\[\Query\Driver\Firebird] $db)+
Create the object by passing the resource for +the query
+ + +resource | +$link | ++ |
\Query\Driver\[\Query\Driver\Firebird] | +$db | ++ |
+ todo + | ++ | +
---|
bindColumn(mixed $column, mixed $param, int $type, mixed $maxlen, array $driverdata) : NULL+
Invalidate method for data consistency
+ + +mixed | +$column | ++ |
mixed | +$param | ++ |
int | +$type | ++ |
mixed | +$maxlen | ++ |
array | +$driverdata | ++ |
+ todo + | ++ | +
---|
bindParam(mixed $parameter, mixed $variable, int $data_type, mixed $maxlen, array $driverdata) : NULL+
Invalidate method for data consistency
+ + +mixed | +$parameter | ++ |
mixed | +$variable | ++ |
int | +$data_type | ++ |
mixed | +$maxlen | ++ |
array | +$driverdata | ++ |
+ todo + | ++ | +
---|
bindValue(mixed $parameter, mixed $variable, int $data_type) : NULL+
Invalidate method for data consistency
+ + +mixed | +$parameter | ++ |
mixed | +$variable | ++ |
int | +$data_type | ++ |
+ todo + | ++ | +
---|
execute(array $args) : \Query\Driver\Firebird_Result
+ Run a prepared statement query
+ + +array | +$args | ++ |
+ todo + | ++ | +
---|
fetch(int $fetch_style, mixed $cursor_orientation, mixed $cursor_offset) : mixed+
Emulate PDO fetch public function
+ + +int | +$fetch_style | ++ |
mixed | +$cursor_orientation | ++ |
mixed | +$cursor_offset | ++ |
+ todo + | ++ | +
---|
fetchAll(int $fetch_style, mixed $statement, mixed $ctor_args) : mixed+
Emulate PDO fetchAll public function
+ + +int | +$fetch_style | ++ |
mixed | +$statement | ++ |
mixed | +$ctor_args | ++ |
+ todo + | ++ | +
---|
fetchColumn(int $column_num) : mixed
+ Emulate PDOStatement::fetchColumn
+ + +int | +$column_num | ++ |
+ todo + | ++ | +
---|
fetchObject(string $class_name, array $ctor_args) : \Query\Driver\stdClass+
Emulate PDOStatement::fetchObject, but only for the default use
+ + +string | +$class_name | ++ |
array | +$ctor_args | ++ |
+ todo + | ++ | +
---|
rowCount() : int+
Return the number of rows affected by the previous query
+ + + + ++ todo + | ++ | +
---|
Firebird Specific SQL
+ + ++ todo + | ++ | +
---|
limit(string $sql, int $limit, int $offset) : string+
Limit clause
+ + +string | +$sql | ++ |
int | +$limit | ++ |
int | +$offset | ++ |
+ todo + | ++ | +
---|
explain(string $sql) : string
+ Get the query plan for the sql query
+ + +string | +$sql | ++ |
+ todo + | ++ | +
---|
+ todo + | ++ | +
---|
db_list() : NULL+
Returns sql to list other databases
+ + + + ++ todo + | ++ | +
---|
table_list() : string+
Returns sql to list tables
+ + + + ++ todo + | ++ | +
---|
system_table_list() : string+
Returns sql to list system tables
+ + + + ++ todo + | ++ | +
---|
view_list() : string+
Returns sql to list views
+ + + + ++ todo + | ++ | +
---|
trigger_list() : string+
Returns sql to list triggers
+ + + + ++ todo + | ++ | +
---|
function_list() : string+
Return sql to list functions
+ + + + ++ todo + | ++ | +
---|
procedure_list() : string+
Return sql to list stored procedures
+ + + + ++ todo + | ++ | +
---|
sequence_list() : string+
Return sql to list sequences
+ + + + ++ todo + | ++ | +
---|
column_list(string $table) : string
+ Return sql to list columns of the specified table
+ + +string | +$table | ++ |
+ todo + | ++ | +
---|
type_list() : string+
SQL to show list of field types
+ + + + ++ todo + | ++ | +
---|
Firebird-specific backup, import and creation methods
+ + ++ todo + | ++ | +
---|
+ todo + | ++ | +
---|
create_table(string $name, array $fields, array $constraints) : string+
Convienience public function to generate sql for creating a db table
+ + +string | +$name | ++ |
array | +$fields | ++ |
array | +$constraints | ++ |
+ todo + | ++ | +
---|
delete_table(string $name) : string
+ Drop the selected table
+ + +string | +$name | ++ |
+ todo + | ++ | +
---|
backup_structure() : string+
Return an SQL file with the database table structure
+ + + + ++ todo + | ++ | +
---|
backup_data() : string+
Return an SQL file with the database data as insert statements
+ + + + ++ todo + | ++ | +
---|
__construct(\Query\Driver\Driver_Interface $conn)
+ Save a reference to the connection object for later use
+ + +\Query\Driver\Driver_Interface | +$conn | ++ |
+ todo + | ++ | +
---|
__call(string $method, array $args) : mixed+
Enable calling driver methods
+ + +string | +$method | ++ |
array | +$args | ++ |
+ todo + | ++ | +
---|
None found |
None found |
query(string $sql) : object
+ + + +
string | +$sql | ++ |
None found |
None found |
quote_ident(string $sql) : string
+ + + +
string | +$sql | ++ |
None found |
quote_table(string $sql) : string
+ + + +
string | +$sql | ++ |
None found |
MySQL specific class
+Extends PDO to simplify cross-database issues
+ ++ todo + | ++ | +
---|
$sql : \Query\Driver\SQL_Interface+
Reference to sql class
+ + ++ todo + | ++ | +
---|
$util : \Query\Driver\DB_Util+
Reference to util class
+ + ++ todo + | ++ | +
---|
$table : \Query\Table\Table_Builder+
Reference to table_builder class
+ + ++ todo + | ++ | +
---|
+ todo + | ++ | +
---|
$table_prefix : string+
Prefix to apply to table names
+ + ++ todo + | ++ | +
---|
$escape_char : string+
Character to escape indentifiers
+ + ++ todo + | ++ | +
---|
$statement : \Query\Driver\PDOStatement+
Reference to the last executed query
+ + ++ todo + | ++ | +
---|
__construct(string $dsn, string $username, string $password, array $driver_options)+
PDO constructor wrapper
+ + +string | +$dsn | ++ |
string | +$username | ++ |
string | +$password | ++ |
array | +$driver_options | ++ |
+ todo + | ++ | +
---|
truncate(string $table) : void
+ Empty the passed table
+ + +string | +$table | ++ |
+ todo + | ++ | +
---|
__call(string $name, array $args)+
Allow invoke to work on table object
+ + +string | +$name | ++ |
array | +$args | ++ |
+ todo + | ++ | +
---|
prepare_query(string $sql, array $data) : \PDOStatement+
Simplifies prepared statements for database queries
+ + +string | +$sql | ++ |
array | +$data | ++ |
| FALSE
++ todo + | ++ | +
---|
prepare_execute(string $sql, array $params) : \PDOStatement+
Create and execute a prepared statement with the provided parameters
+ + +string | +$sql | ++ |
array | +$params | ++ |
+ todo + | ++ | +
---|
affected_rows() : int+
Returns number of rows affected by an INSERT, UPDATE, DELETE type query
+ + + + ++ todo + | ++ | +
---|
prefix_table(string $table) : string
+ Prefixes a table if it is not already prefixed
+ + +string | +$table | ++ |
+ todo + | ++ | +
---|
quote_table(string $table) : string
+ Quote database table name, and set prefix
+ + +string | +$table | ++ |
+ todo + | ++ | +
---|
quote_ident(mixed $ident) : string
+ Surrounds the string with the databases identifier escape characters
+ + +mixed | +$ident | ++ |
+ todo + | ++ | +
---|
_quote(mixed $str) : mixed
+ Helper method for quote_ident
+ + +mixed | +$str | ++ |
+ todo + | ++ | +
---|
get_schemas() : array+
Return schemas for databases that list them
+ + + + ++ todo + | ++ | +
---|
get_tables() : array+
Return list of tables for the current database
+ + + + ++ todo + | ++ | +
---|
get_dbs() : array+
Return list of dbs for the current connection, if possible
+ + + + ++ todo + | ++ | +
---|
get_views() : array+
Return list of views for the current database
+ + + + ++ todo + | ++ | +
---|
get_sequences() : array+
Return list of sequences for the current database, if they exist
+ + + + ++ todo + | ++ | +
---|
get_functions() : array+
Return list of function for the current database
+ + + + ++ todo + | ++ | +
---|
get_procedures() : array+
Return list of stored procedures for the current database
+ + + + ++ todo + | ++ | +
---|
get_triggers() : array+
Return list of triggers for the current database
+ + + + ++ todo + | ++ | +
---|
get_system_tables() : array+
Retreives an array of non-user-created tables for +the connection/database
+ + + + ++ todo + | ++ | +
---|
get_columns(string $table) : array
+ Retrieve column information for the current database table
+ + +string | +$table | ++ |
+ todo + | ++ | +
---|
get_fks(string $table) : array
+ Retrieve foreign keys for the table
+ + +string | +$table | ++ |
+ todo + | ++ | +
---|
get_indexes(string $table) : array
+ Retrieve indexes for the table
+ + +string | +$table | ++ |
+ todo + | ++ | +
---|
get_types() : array+
Retrieve list of data types for the database
+ + + + ++ todo + | ++ | +
---|
driver_query(string|array|null $query, bool $filtered_index) : array+
Method to simplify retreiving db results for meta-data queries
+ + +string|array|null | +$query | ++ |
bool | +$filtered_index | ++ |
+ todo + | ++ | +
---|
num_rows() : int+
Return the number of rows returned for a SELECT query
+ + + + ++ todo + | ++ | +
---|
insert_batch(string $table, array $data) : array+
Create sql for batch insert
+ + +string | +$table | ++ |
array | +$data | ++ |
+ todo + | ++ | +
---|
_prefix(string $str) : string
+ Sets the table prefix on the passed string
+ + +string | +$str | ++ |
+ todo + | ++ | +
---|
MySQL specifc SQL
+ + ++ todo + | ++ | +
---|
limit(string $sql, int $limit, int $offset) : string+
Limit clause
+ + +string | +$sql | ++ |
int | +$limit | ++ |
int | +$offset | ++ |
+ todo + | ++ | +
---|
explain(string $sql) : string
+ Get the query plan for the sql query
+ + +string | +$sql | ++ |
+ todo + | ++ | +
---|
+ todo + | ++ | +
---|
db_list() : string+
Returns sql to list other databases
+ + + + ++ todo + | ++ | +
---|
table_list(string $database) : string
+ Returns sql to list tables
+ + +string | +$database | ++ |
+ todo + | ++ | +
---|
system_table_list() : string+
Overridden in MySQL class
+ + + + ++ todo + | ++ | +
---|
view_list() : string+
Returns sql to list views
+ + + + ++ todo + | ++ | +
---|
trigger_list() : string+
Returns sql to list triggers
+ + + + ++ todo + | ++ | +
---|
function_list() : string+
Return sql to list functions
+ + + + ++ todo + | ++ | +
---|
procedure_list() : string+
Return sql to list stored procedures
+ + + + ++ todo + | ++ | +
---|
sequence_list() : NULL+
Return sql to list sequences
+ + + + ++ todo + | ++ | +
---|
type_list() : string+
SQL to show list of field types
+ + + + ++ todo + | ++ | +
---|
column_list(string $table) : string
+ SQL to show infromation about columns in a table
+ + +string | +$table | ++ |
+ todo + | ++ | +
---|
MySQL-specific backup, import and creation methods
+ + ++ todo + | ++ | +
---|
+ todo + | ++ | +
---|
backup_structure() : string+
Return an SQL file with the database table structure
+ + + + ++ todo + | ++ | +
---|
backup_data() : string+
Return an SQL file with the database data as insert statements
+ + + + ++ todo + | ++ | +
---|
__construct(\Query\Driver\Driver_Interface $conn)
+ Save a reference to the connection object for later use
+ + +\Query\Driver\Driver_Interface | +$conn | ++ |
+ todo + | ++ | +
---|
__call(string $method, array $args) : mixed+
Enable calling driver methods
+ + +string | +$method | ++ |
array | +$args | ++ |
+ todo + | ++ | +
---|
create_table(string $name, array $fields, array $constraints) : string+
Convienience public function to generate sql for creating a db table
+ + +string | +$name | ++ |
array | +$fields | ++ |
array | +$constraints | ++ |
+ todo + | ++ | +
---|
delete_table(string $name) : string
+ Drop the selected table
+ + +string | +$name | ++ |
+ todo + | ++ | +
---|
None found |
driver_query(string $sql, bool $filtered_index=TRUE) : mixed+
+ + +
string | +$sql | ++ |
bool | +$filtered_index=TRUE | ++ |
None found |
None found |
None found |
query(string $sql) : mixed
+ + + +
string | +$sql | ++ |
None found |
quote(string $str) : string
+ + + +
string | +$str | ++ |
None found |
quote_ident(string $sql) : string
+ + + +
string | +$sql | ++ |
None found |
quote_table(string $sql) : string
+ + + +
string | +$sql | ++ |
None found |
PostgreSQL specifc class
+Extends PDO to simplify cross-database issues
+ ++ todo + | ++ | +
---|
$sql : \Query\Driver\SQL_Interface+
Reference to sql class
+ + ++ todo + | ++ | +
---|
$util : \Query\Driver\DB_Util+
Reference to util class
+ + ++ todo + | ++ | +
---|
$table : \Query\Table\Table_Builder+
Reference to table_builder class
+ + ++ todo + | ++ | +
---|
+ todo + | ++ | +
---|
$table_prefix : string+
Prefix to apply to table names
+ + ++ todo + | ++ | +
---|
$statement : \Query\Driver\PDOStatement+
Reference to the last executed query
+ + ++ todo + | ++ | +
---|
$escape_char : string+
Character to escape indentifiers
+ + ++ todo + | ++ | +
---|
__construct(string $dsn, string $username, string $password, array $driver_options)+
PDO constructor wrapper
+ + +string | +$dsn | ++ |
string | +$username | ++ |
string | +$password | ++ |
array | +$driver_options | ++ |
+ todo + | ++ | +
---|
truncate(string $table) : void
+ Empty the passed table
+ + +string | +$table | ++ |
+ todo + | ++ | +
---|
get_schemas() : array+
Return schemas for databases that list them
+ + + + ++ todo + | ++ | +
---|
__call(string $name, array $args)+
Allow invoke to work on table object
+ + +string | +$name | ++ |
array | +$args | ++ |
+ todo + | ++ | +
---|
prepare_query(string $sql, array $data) : \PDOStatement+
Simplifies prepared statements for database queries
+ + +string | +$sql | ++ |
array | +$data | ++ |
| FALSE
++ todo + | ++ | +
---|
prepare_execute(string $sql, array $params) : \PDOStatement+
Create and execute a prepared statement with the provided parameters
+ + +string | +$sql | ++ |
array | +$params | ++ |
+ todo + | ++ | +
---|
affected_rows() : int+
Returns number of rows affected by an INSERT, UPDATE, DELETE type query
+ + + + ++ todo + | ++ | +
---|
prefix_table(string $table) : string
+ Prefixes a table if it is not already prefixed
+ + +string | +$table | ++ |
+ todo + | ++ | +
---|
quote_table(string $table) : string
+ Quote database table name, and set prefix
+ + +string | +$table | ++ |
+ todo + | ++ | +
---|
quote_ident(mixed $ident) : string
+ Surrounds the string with the databases identifier escape characters
+ + +mixed | +$ident | ++ |
+ todo + | ++ | +
---|
_quote(mixed $str) : mixed
+ Helper method for quote_ident
+ + +mixed | +$str | ++ |
+ todo + | ++ | +
---|
get_tables() : array+
Return list of tables for the current database
+ + + + ++ todo + | ++ | +
---|
get_dbs() : array+
Return list of dbs for the current connection, if possible
+ + + + ++ todo + | ++ | +
---|
get_views() : array+
Return list of views for the current database
+ + + + ++ todo + | ++ | +
---|
get_sequences() : array+
Return list of sequences for the current database, if they exist
+ + + + ++ todo + | ++ | +
---|
get_functions() : array+
Return list of function for the current database
+ + + + ++ todo + | ++ | +
---|
get_procedures() : array+
Return list of stored procedures for the current database
+ + + + ++ todo + | ++ | +
---|
get_triggers() : array+
Return list of triggers for the current database
+ + + + ++ todo + | ++ | +
---|
get_system_tables() : array+
Retreives an array of non-user-created tables for +the connection/database
+ + + + ++ todo + | ++ | +
---|
get_columns(string $table) : array
+ Retrieve column information for the current database table
+ + +string | +$table | ++ |
+ todo + | ++ | +
---|
get_fks(string $table) : array
+ Retrieve foreign keys for the table
+ + +string | +$table | ++ |
+ todo + | ++ | +
---|
get_indexes(string $table) : array
+ Retrieve indexes for the table
+ + +string | +$table | ++ |
+ todo + | ++ | +
---|
get_types() : array+
Retrieve list of data types for the database
+ + + + ++ todo + | ++ | +
---|
driver_query(string|array|null $query, bool $filtered_index) : array+
Method to simplify retreiving db results for meta-data queries
+ + +string|array|null | +$query | ++ |
bool | +$filtered_index | ++ |
+ todo + | ++ | +
---|
num_rows() : int+
Return the number of rows returned for a SELECT query
+ + + + ++ todo + | ++ | +
---|
insert_batch(string $table, array $data) : array+
Create sql for batch insert
+ + +string | +$table | ++ |
array | +$data | ++ |
+ todo + | ++ | +
---|
_prefix(string $str) : string
+ Sets the table prefix on the passed string
+ + +string | +$str | ++ |
+ todo + | ++ | +
---|
PostgreSQL specifc SQL
+ + ++ todo + | ++ | +
---|
explain(string $sql) : string
+ Get the query plan for the sql query
+ + +string | +$sql | ++ |
+ todo + | ++ | +
---|
+ todo + | ++ | +
---|
db_list() : string+
Returns sql to list other databases
+ + + + ++ todo + | ++ | +
---|
table_list() : string+
Returns sql to list tables
+ + + + ++ todo + | ++ | +
---|
system_table_list() : string+
Returns sql to list system tables
+ + + + ++ todo + | ++ | +
---|
view_list() : string+
Returns sql to list views
+ + + + ++ todo + | ++ | +
---|
trigger_list() : string+
Returns sql to list triggers
+ + + + ++ todo + | ++ | +
---|
function_list() : NULL+
Return sql to list functions
+ + + + ++ todo + | ++ | +
---|
procedure_list() : string+
Return sql to list stored procedures
+ + + + ++ todo + | ++ | +
---|
sequence_list() : string+
Return sql to list sequences
+ + + + ++ todo + | ++ | +
---|
column_list(string $table) : string
+ Return sql to list columns of the specified table
+ + +string | +$table | ++ |
+ todo + | ++ | +
---|
type_list() : string+
SQL to show list of field types
+ + + + ++ todo + | ++ | +
---|
fk_list(string $table) : string
+ Get the list of foreign keys for the current +table
+ + +string | +$table | ++ |
+ todo + | ++ | +
---|
index_list(string $table) : array
+ Get the list of indexes for the current table
+ + +string | +$table | ++ |
+ todo + | ++ | +
---|
limit(string $sql, int $limit, int $offset) : string+
Limit clause
+ + +string | +$sql | ++ |
int | +$limit | ++ |
int | +$offset | ++ |
+ todo + | ++ | +
---|
Posgres-specific backup, import and creation methods
+ + ++ todo + | ++ | +
---|
+ todo + | ++ | +
---|
backup_structure() : string+
Return an SQL file with the database table structure
+ + + + ++ todo + | ++ | +
---|
backup_data() : string+
Return an SQL file with the database data as insert statements
+ + + + ++ todo + | ++ | +
---|
__construct(\Query\Driver\Driver_Interface $conn)
+ Save a reference to the connection object for later use
+ + +\Query\Driver\Driver_Interface | +$conn | ++ |
+ todo + | ++ | +
---|
__call(string $method, array $args) : mixed+
Enable calling driver methods
+ + +string | +$method | ++ |
array | +$args | ++ |
+ todo + | ++ | +
---|
create_table(string $name, array $fields, array $constraints) : string+
Convienience public function to generate sql for creating a db table
+ + +string | +$name | ++ |
array | +$fields | ++ |
array | +$constraints | ++ |
+ todo + | ++ | +
---|
delete_table(string $name) : string
+ Drop the selected table
+ + +string | +$name | ++ |
+ todo + | ++ | +
---|
query(string $sql) : mixed
+ + + +
string | +$sql | ++ |
None found |
None found |
quote_ident(string $sql) : string
+ + + +
string | +$sql | ++ |
None found |
quote_table(string $sql) : string
+ + + +
string | +$sql | ++ |
None found |
parent for database manipulation subclasses
+ + +todo | ++ | +
---|
limit(string $sql, int $limit, int $offset) : string+
Get database specific sql for limit clause
+ + +string | +$sql | ++ |
int | +$limit | ++ |
int | +$offset | ++ |
+ todo + | ++ | +
---|
explain(string $sql) : string
+ Modify the query to get the query plan
+ + +string | +$sql | ++ |
+ todo + | ++ | +
---|
random() : string+
Get the sql for random ordering
+ + + + ++ todo + | ++ | +
---|
db_list() : string+
Returns sql to list other databases
+ + + + ++ todo + | ++ | +
---|
table_list() : string+
Returns sql to list tables
+ + + + ++ todo + | ++ | +
---|
system_table_list() : string+
Returns sql to list system tables
+ + + + ++ todo + | ++ | +
---|
view_list() : string+
Returns sql to list views
+ + + + ++ todo + | ++ | +
---|
trigger_list() : string+
Returns sql to list triggers
+ + + + ++ todo + | ++ | +
---|
function_list() : NULL+
Return sql to list functions
+ + + + ++ todo + | ++ | +
---|
procedure_list() : string+
Return sql to list stored procedures
+ + + + ++ todo + | ++ | +
---|
sequence_list() : string+
Return sql to list sequences
+ + + + ++ todo + | ++ | +
---|
type_list() : string|array+
Return sql to list database field types
+ + + + ++ todo + | ++ | +
---|
column_list(string $table) : string
+ Get information about the columns in the +specified table
+ + +string | +$table | ++ |
+ todo + | ++ | +
---|
SQLite specific class
+Extends PDO to simplify cross-database issues
+ ++ todo + | ++ | +
---|
$sql : \Query\Driver\SQL_Interface+
Reference to sql class
+ + ++ todo + | ++ | +
---|
$util : \Query\Driver\DB_Util+
Reference to util class
+ + ++ todo + | ++ | +
---|
$table : \Query\Table\Table_Builder+
Reference to table_builder class
+ + ++ todo + | ++ | +
---|
+ todo + | ++ | +
---|
$table_prefix : string+
Prefix to apply to table names
+ + ++ todo + | ++ | +
---|
$statement : \Query\Driver\PDOStatement+
Reference to the last executed query
+ + ++ todo + | ++ | +
---|
$escape_char : string+
Character to escape indentifiers
+ + ++ todo + | ++ | +
---|
__construct(string $dsn, string $username, string $password, array $driver_options)+
PDO constructor wrapper
+ + +string | +$dsn | ++ |
string | +$username | ++ |
string | +$password | ++ |
array | +$driver_options | ++ |
+ todo + | ++ | +
---|
truncate(string $table) : void
+ Empty the passed table
+ + +string | +$table | ++ |
+ todo + | ++ | +
---|
get_tables() : array+
Return list of tables for the current database
+ + + + ++ todo + | ++ | +
---|
get_fks(string $table) : array
+ Retrieve foreign keys for the table
+ + +string | +$table | ++ |
+ todo + | ++ | +
---|
insert_batch(string $table, array $data) : array+
Create sql for batch insert
+ + +string | +$table | ++ |
array | +$data | ++ |
+ todo + | ++ | +
---|
__call(string $name, array $args)+
Allow invoke to work on table object
+ + +string | +$name | ++ |
array | +$args | ++ |
+ todo + | ++ | +
---|
prepare_query(string $sql, array $data) : \PDOStatement+
Simplifies prepared statements for database queries
+ + +string | +$sql | ++ |
array | +$data | ++ |
| FALSE
++ todo + | ++ | +
---|
prepare_execute(string $sql, array $params) : \PDOStatement+
Create and execute a prepared statement with the provided parameters
+ + +string | +$sql | ++ |
array | +$params | ++ |
+ todo + | ++ | +
---|
affected_rows() : int+
Returns number of rows affected by an INSERT, UPDATE, DELETE type query
+ + + + ++ todo + | ++ | +
---|
prefix_table(string $table) : string
+ Prefixes a table if it is not already prefixed
+ + +string | +$table | ++ |
+ todo + | ++ | +
---|
quote_table(string $table) : string
+ Quote database table name, and set prefix
+ + +string | +$table | ++ |
+ todo + | ++ | +
---|
quote_ident(mixed $ident) : string
+ Surrounds the string with the databases identifier escape characters
+ + +mixed | +$ident | ++ |
+ todo + | ++ | +
---|
_quote(mixed $str) : mixed
+ Helper method for quote_ident
+ + +mixed | +$str | ++ |
+ todo + | ++ | +
---|
get_schemas() : array+
Return schemas for databases that list them
+ + + + ++ todo + | ++ | +
---|
get_dbs() : array+
Return list of dbs for the current connection, if possible
+ + + + ++ todo + | ++ | +
---|
get_views() : array+
Return list of views for the current database
+ + + + ++ todo + | ++ | +
---|
get_sequences() : array+
Return list of sequences for the current database, if they exist
+ + + + ++ todo + | ++ | +
---|
get_functions() : array+
Return list of function for the current database
+ + + + ++ todo + | ++ | +
---|
get_procedures() : array+
Return list of stored procedures for the current database
+ + + + ++ todo + | ++ | +
---|
get_triggers() : array+
Return list of triggers for the current database
+ + + + ++ todo + | ++ | +
---|
get_system_tables() : array+
Retreives an array of non-user-created tables for +the connection/database
+ + + + ++ todo + | ++ | +
---|
get_columns(string $table) : array
+ Retrieve column information for the current database table
+ + +string | +$table | ++ |
+ todo + | ++ | +
---|
get_indexes(string $table) : array
+ Retrieve indexes for the table
+ + +string | +$table | ++ |
+ todo + | ++ | +
---|
get_types() : array+
Retrieve list of data types for the database
+ + + + ++ todo + | ++ | +
---|
driver_query(string|array|null $query, bool $filtered_index) : array+
Method to simplify retreiving db results for meta-data queries
+ + +string|array|null | +$query | ++ |
bool | +$filtered_index | ++ |
+ todo + | ++ | +
---|
num_rows() : int+
Return the number of rows returned for a SELECT query
+ + + + ++ todo + | ++ | +
---|
_prefix(string $str) : string
+ Sets the table prefix on the passed string
+ + +string | +$str | ++ |
+ todo + | ++ | +
---|
SQLite Specific SQL
+ + ++ todo + | ++ | +
---|
explain(string $sql) : string
+ Get the query plan for the sql query
+ + +string | +$sql | ++ |
+ todo + | ++ | +
---|
+ todo + | ++ | +
---|
db_list() : string+
Returns sql to list other databases
+ + + + ++ todo + | ++ | +
---|
table_list() : string+
Returns sql to list tables
+ + + + ++ todo + | ++ | +
---|
system_table_list() : string+
Overridden in SQLite class
+ + + + ++ todo + | ++ | +
---|
view_list() : string+
Returns sql to list views
+ + + + ++ todo + | ++ | +
---|
trigger_list() : NULL+
Returns sql to list triggers
+ + + + ++ todo + | ++ | +
---|
function_list() : NULL+
Return sql to list functions
+ + + + ++ todo + | ++ | +
---|
procedure_list() : NULL+
Return sql to list stored procedures
+ + + + ++ todo + | ++ | +
---|
sequence_list() : NULL+
Return sql to list sequences
+ + + + ++ todo + | ++ | +
---|
type_list() : string[]+
SQL to show list of field types
+ + + + ++ todo + | ++ | +
---|
column_list(string $table) : string
+ SQL to show infromation about columns in a table
+ + +string | +$table | ++ |
+ todo + | ++ | +
---|
fk_list(string $table) : string
+ Get the list of foreign keys for the current +table
+ + +string | +$table | ++ |
+ todo + | ++ | +
---|
index_list(string $table) : array
+ Get the list of indexes for the current table
+ + +string | +$table | ++ |
+ todo + | ++ | +
---|
limit(string $sql, int $limit, int $offset) : string+
Limit clause
+ + +string | +$sql | ++ |
int | +$limit | ++ |
int | +$offset | ++ |
+ todo + | ++ | +
---|
SQLite-specific backup, import and creation methods
+ + ++ todo + | ++ | +
---|
+ todo + | ++ | +
---|
backup_data() : string+
Return an SQL file with the database data as insert statements
+ + + + ++ todo + | ++ | +
---|
backup_structure() : string+
Return an SQL file with the database table structure
+ + + + ++ todo + | ++ | +
---|
__construct(\Query\Driver\Driver_Interface $conn)
+ Save a reference to the connection object for later use
+ + +\Query\Driver\Driver_Interface | +$conn | ++ |
+ todo + | ++ | +
---|
__call(string $method, array $args) : mixed+
Enable calling driver methods
+ + +string | +$method | ++ |
array | +$args | ++ |
+ todo + | ++ | +
---|
create_table(string $name, array $fields, array $constraints) : string+
Convienience public function to generate sql for creating a db table
+ + +string | +$name | ++ |
array | +$fields | ++ |
array | +$constraints | ++ |
+ todo + | ++ | +
---|
delete_table(string $name) : string
+ Drop the selected table
+ + +string | +$name | ++ |
+ todo + | ++ | +
---|
query(string $sql) : mixed
+ + + +
string | +$sql | ++ |
None found |
quote(string $str) : string
+ + + +
string | +$str | ++ |
None found |
quote_ident(string $sql) : string
+ + + +
string | +$sql | ++ |
None found |
quote_table(string $sql) : string
+ + + +
string | +$sql | ++ |
None found |