Query\Drivers\Firebird\Driver
Firebird Database class
PDO-firebird isn't stable, so this is a wrapper of the fbird_ public functions.
Synopsis
- // members
- protected $statement = NULL;
- protected resource $statement_link = NULL;
- protected resource $trans = NULL;
- protected resource $conn = NULL;
- protected resource $service = NULL;
- protected bool $has_truncate = FALSE;
- // Inherited members from AbstractDriver
- protected PDOStatement $statement;
- protected string $escape_char;
- protected SQL_Interface $sql;
- protected Abstract_Util $util;
- protected $last_query;
- protected string $table_prefix;
- protected bool $has_truncate;
- // methods
- public void __construct()
- public void __destruct()
- public resource get_service()
- public int exec()
- public mixed getAttribute()
- public bool inTransaction()
- public mixed lastInsertId()
- public Result query()
- public Result prepare()
- public boolean|null beginTransaction()
- public bool commit()
- public bool rollBack()
- public bool setAttribute()
- public Result prepare_execute()
- public string quote()
- public array errorInfo()
- public array errorCode()
- public NULL prepare_query()
- public array insert_batch()
- // Inherited methods from AbstractDriver
- public void __construct()
- protected void _load_sub_classes()
- public mixed __call()
- public string get_last_query()
- public void set_last_query()
- public SQL_Interface get_sql()
- public Abstract_Util get_util()
- public void set_table_prefix()
- public PDOStatement prepare_query()
- public PDOStatement prepare_execute()
- public int affected_rows()
- public string prefix_table()
- public string quote_table()
- public string quote_ident()
- public array get_schemas()
- public array get_tables()
- public array get_dbs()
- public array get_views()
- public array get_sequences()
- public array get_functions()
- public array get_procedures()
- public array get_triggers()
- public array get_system_tables()
- public array get_columns()
- public array get_fks()
- public array get_indexes()
- public array get_types()
- public array driver_query()
- public int num_rows()
- public null|array<string|array|null> insert_batch()
- public mixed _quote()
- protected string _prefix()
- public PDOStatement truncate()
- // Inherited methods from PDO
- public void __construct()
- public bool beginTransaction()
- public bool commit()
- public mixed errorCode()
- public array errorInfo()
- public int exec()
- public mixed getAttribute()
- public array getAvailableDrivers()
- public bool inTransaction()
- public string lastInsertId()
- public PDOStatement prepare()
- public PDOStatement query()
- public string quote()
- public bool rollBack()
- public bool setAttribute()
Hierarchy
Extends
Members
protected
- $conn
—
resource
Reference to the connection resource - $escape_char
—
string
Character to escape identifiers - $has_truncate
—
Query\Drivers\Firebird\bool
Firebird doesn't have the truncate keyword - $has_truncate
—
Query\bool
Whether the driver supports 'TRUNCATE' - $last_query
—
string
Last query executed - $service
—
resource
Reference to the service resource - $sql
—
Query\SQL_Interface
Reference to sql class - $statement
—
Reference to the last query executed - $statement
—
\PDOStatement
Reference to the last executed query - $statement_link
—
resource
Reference to the resource returned by the last query executed - $table_prefix
—
string
Prefix to apply to table names - $trans
—
resource
Reference to the current transaction - $util
—
Query\Abstract_Util
Reference to util class
Methods
public
- __construct() — Open the link to the database
- __destruct() — Cleanup some loose ends
- beginTransaction() — Start a database transaction
- commit() — Commit a database transaction
- errorCode() — Method to emulate PDO->errorCode
- errorInfo() — Method to emulate PDO->errorInfo / PDOStatement->errorInfo
- exec() — Execute an sql statement and return number of affected rows
- getAttribute() — Implement for compatibility with PDO
- get_service() — Return service handle
- inTransaction() — Return whether the current statement is in a transaction
- insert_batch() — Create sql for batch insert
- lastInsertId() — Returns the last value of the specified generator
- prepare() — Emulate PDO prepare
- prepare_execute() — Prepare and execute a query
- prepare_query() — Bind a prepared query with arguments for executing
- query() — Wrapper public function to better match PDO
- quote() — Method to emulate PDO->quote
- rollBack() — Rollback a transaction
- setAttribute() — Set a connection attribute
Inherited from Query\AbstractDriver
protected
- _load_sub_classes() — Loads the subclasses for the driver
- _prefix() — Sets the table prefix on the passed string
public
- __call() — Allow invoke to work on table object
- _quote() — Helper method for quote_ident
- affected_rows() — Returns number of rows affected by an INSERT, UPDATE, DELETE type query
- driver_query() — Method to simplify retrieving db results for meta-data queries
- get_columns() — Retrieve column information for the current database table
- get_dbs() — Return list of dbs for the current connection, if possible
- get_fks() — Retrieve foreign keys for the table
- get_functions() — Return list of functions for the current database
- get_indexes() — Retrieve indexes for the table
- get_last_query() — Get the last sql query exexcuted
- get_procedures() — Return list of stored procedures for the current database
- get_schemas() — Return schemas for databases that list them
- get_sequences() — Return list of sequences for the current database, if they exist
- get_sql() — Get the SQL class for the current driver
- get_system_tables() — Retrieves an array of non-user-created tables for the connection/database
- get_tables() — Return list of tables for the current database
- get_triggers() — Return list of triggers for the current database
- get_types() — Retrieve list of data types for the database
- get_util() — Get the Util class for the current driver
- get_views() — Return list of views for the current database
- insert_batch() — Create sql for batch insert
- num_rows() — Return the number of rows returned for a SELECT query
- prefix_table() — Prefixes a table if it is not already prefixed
- prepare_execute() — Create and execute a prepared statement with the provided parameters
- prepare_query() — Simplifies prepared statements for database queries
- quote_ident() — Surrounds the string with the databases identifier escape characters
- quote_table() — Quote database table name, and set prefix
- set_last_query() — Set the last query sql
- set_table_prefix() — Set the common table name prefix
- truncate() — Empty the passed table
Inherited from PDO
public
- beginTransaction() — Initiates a transaction
- commit() — Commits a transaction
- errorCode() — Fetch the SQLSTATE associated with the last operation on the database handle
- errorInfo() — Fetch extended error information associated with the last operation on the database handle
- exec() — Execute an SQL statement and return the number of affected rows
- getAttribute() — Retrieve a database connection attribute
- getAvailableDrivers() — Return an array of available PDO drivers
- inTransaction() — Checks if inside a transaction
- lastInsertId() — Returns the ID of the last inserted row or sequence value
- prepare() — Prepares a statement for execution and returns a statement object
- query() — Executes an SQL statement, returning a result set as a PDOStatement object
- quote() — Quotes a string for use in a query.
- rollBack() — Rolls back a transaction
- setAttribute() — Set an attribute
History
-
2015-11-10T10:12:23-05:00 (commit #b5a141f)
Author: Timothy J Warren (tim@timshomepage.net) / Commiter: Timothy J Warren (tim@timshomepage.net)
Make class names Pascal Case
-
2015-07-30T16:40:30-04:00 (commit #225017a)
Author: Timothy J. Warren (tim@timshomepage.net) / Commiter: Timothy J. Warren (tim@timshomepage.net)
Lots of refactoring -- accessors/mutators instead of direct access, reduce query builder test database connections, and simplify some logic
-
2015-07-30T13:13:12-04:00 (commit #8669fcc)
Author: Timothy J. Warren (tim@timshomepage.net) / Commiter: Timothy J. Warren (tim@timshomepage.net)
Some scrutinizer fixes
-
2015-07-29T16:59:27-04:00 (commit #f3769ba)
Author: Scrutinizer Auto-Fixer (auto-fixer@scrutinizer-ci.com) / Commiter: Scrutinizer Auto-Fixer (auto-fixer@scrutinizer-ci.com)
Scrutinizer Auto-Fixes This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
-
2015-07-29T16:51:17-04:00 (commit #8511c6a)
Author: Timothy J. Warren (tim@timshomepage.net) / Commiter: Timothy J. Warren (tim@timshomepage.net)
Move library into src folder, fix simpletest test runner
-
2015-07-17T15:38:06-04:00 (commit #28f5cb2)
Author: Timothy J. Warren (tim@timshomepage.net) / Commiter: Timothy J. Warren (tim@timshomepage.net)
Fix Firebird tests and speed up tests by using one database connection for each query builder datbase test
-
2015-07-16T16:56:13-04:00 (commit #bfc3ea3)
Author: Timothy J. Warren (tim@timshomepage.net) / Commiter: Timothy J. Warren (tim@timshomepage.net)
Reorganize drivers into a more modern layout
-
2014-04-24T20:14:19-04:00 (commit #2ae38be)
Author: Timothy J. Warren (tim@timshomepage.net) / Commiter: Timothy J. Warren (tim@timshomepage.net)
Remove some variable setting logic duplication
-
2014-04-24T17:07:50-04:00 (commit #81be910)
Author: Timothy J. Warren (tim@timshomepage.net) / Commiter: Timothy J. Warren (tim@timshomepage.net)
Split Query Builder class
-
2014-04-24T16:25:04-04:00 (commit #5b531cf)
Author: Timothy J. Warren (tim@timshomepage.net) / Commiter: Timothy J. Warren (tim@timshomepage.net)
De-duplicate truncate method of drivers
-
2014-04-24T15:32:09-04:00 (commit #17354ee)
Author: Timothy J. Warren (tim@timshomepage.net) / Commiter: Timothy J. Warren (tim@timshomepage.net)
Move SQL and Util classes to their own namespaces
-
2014-04-24T14:50:53-04:00 (commit #993a2ab)
Author: Timothy J. Warren (tim@timshomepage.net) / Commiter: Timothy J. Warren (tim@timshomepage.net)
Allow camelCase method calls, update interfaces with missing methods
-
2014-04-22T14:02:54-04:00 (commit #0a64edd)
Author: Timothy J. Warren (tim@timshomepage.net) / Commiter: Timothy J. Warren (tim@timshomepage.net)
Fix some typos and docblocks
-
2014-04-10T15:54:43-04:00 (commit #32696a5)
Author: Timothy J. Warren (tim@timshomepage.net) / Commiter: Timothy J. Warren (tim@timshomepage.net)
Flesh out the table builder a bit, and add some missing driver methods to SQLite
-
2014-04-09T13:20:30-04:00 (commit #3cc260b)
Author: Timothy J. Warren (tim@timshomepage.net) / Commiter: Timothy J. Warren (tim@timshomepage.net)
Deduplicate error methods in Firebird_Result class
-
2014-04-08T14:43:07-04:00 (commit #85b804a)
Author: Timothy J. Warren (tim@timshomepage.net) / Commiter: Timothy J. Warren (tim@timshomepage.net)
Update drivers with missing method