Query\Drivers\AbstractDriver
Base Database class
Extends PDO to simplify cross-database issues
Synopsis
- // methods
- public void __construct()
- public mixed __call()
- public string getLastQuery()
- public void setLastQuery()
- public SQLInterface getSql()
- public AbstractUtil getUtil()
- public void setTablePrefix()
- public PDOStatement prepareQuery()
- public PDOStatement prepareExecute()
- public int affectedRows()
- public string prefixTable()
- public string quoteTable()
- public string|array quoteIdent()
- public ?array getSchemas()
- public ?array getTables()
- public ?array getDbs()
- public ?array getViews()
- public ?array getSequences()
- public ?array getFunctions()
- public ?array getProcedures()
- public ?array getTriggers()
- public ?array getSystemTables()
- public ?array getColumns()
- public ?array getFks()
- public ?array getIndexes()
- public ?array getTypes()
- public ?array driverQuery()
- public ?int numRows()
- public array insertBatch()
- public array updateBatch()
- public PDOStatement truncate()
- public mixed _quote()
- // Inherited methods from PDO
- public void __construct()
- public bool beginTransaction()
- public bool commit()
- public string 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
Methods
public
- __construct() — PDO constructor wrapper
- __call() — Allow invoke to work on table object
- _quote() — Helper method for quote_ident
- affectedRows() — Returns number of rows affected by an INSERT, UPDATE, DELETE type query
- driverQuery() — Method to simplify retrieving db results for meta-data queries
- getColumns() — Retrieve column information for the current database table
- getDbs() — Return list of dbs for the current connection, if possible
- getFks() — Retrieve foreign keys for the table
- getFunctions() — Return list of functions for the current database
- getIndexes() — Retrieve indexes for the table
- getLastQuery() — Get the last sql query executed
- getProcedures() — Return list of stored procedures for the current database
- getSchemas() — Return schemas for databases that list them
- getSequences() — Return list of sequences for the current database, if they exist
- getSql() — Get the SQL class for the current driver
- getSystemTables() — Retrieves an array of non-user-created tables for the connection/database
- getTables() — Return list of tables for the current database
- getTriggers() — Return list of triggers for the current database
- getTypes() — Retrieve list of data types for the database
- getUtil() — Get the Util class for the current driver
- getViews() — Return list of views for the current database
- insertBatch() — Create sql for batch insert
- numRows() — Return the number of rows returned for a SELECT query
- prefixTable() — Prefixes a table if it is not already prefixed
- prepareExecute() — Create and execute a prepared statement with the provided parameters
- prepareQuery() — Simplifies prepared statements for database queries
- quoteIdent() — Surrounds the string with the databases identifier escape characters
- quoteTable() — Quote database table name, and set prefix
- setLastQuery() — Set the last query sql
- setTablePrefix() — Set the common table name prefix
- truncate() — Empty the passed table
- updateBatch() — Creates a batch update, and executes it.
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
-
2019-12-10T12:17:40-05:00 (commit #6a36a85)
Author: Timothy J Warren (tim@timshomepage.net) / Commiter: Timothy J Warren (tim@timshomepage.net)
Update dependencies and tests
-
2018-02-09T16:14:40-05:00 (commit #2839e6a)
Author: Timothy J Warren (tim@timshomepage.net) / Commiter: Timothy J Warren (tim@timshomepage.net)
Fix some indentation issues
-
2018-01-26T15:45:46-05:00 (commit #33bb440)
Author: Timothy J Warren (tim@timshomepage.net) / Commiter: Timothy J Warren (tim@timshomepage.net)
SQLite improvements, remove nullable PDOStatement return values
-
2018-01-26T08:39:30-05:00 (commit #3067976)
Author: Timothy J Warren (tim@timshomepage.net) / Commiter: Timothy J Warren (tim@timshomepage.net)
Add updateBatch method
-
2018-01-24T15:03:41-05:00 (commit #f967aaf)
Author: Timothy J Warren (tim@timshomepage.net) / Commiter: Timothy J Warren (tim@timshomepage.net)
Remove method separators, update documentation building configuration
-
2018-01-24T13:14:03-05:00 (commit #1d583bc)
Author: Timothy J Warren (tim@timshomepage.net) / Commiter: Timothy J Warren (tim@timshomepage.net)
Add more type hinting
-
2018-01-22T16:04:29-05:00 (commit #8401cce)
Author: Timothy J Warren (tim@timshomepage.net) / Commiter: Timothy J Warren (tim@timshomepage.net)
Remove PDOInterface to prevent conflicts in method parameters with native PDO object
-
2018-01-22T15:43:56-05:00 (commit #91eb812)
Author: Timothy J Warren (tim@timshomepage.net) / Commiter: Timothy J Warren (tim@timshomepage.net)
Various refactoring
-
2018-01-19T15:47:34-05:00 (commit #369ca6e)
Author: Timothy J Warren (tim@timshomepage.net) / Commiter: Timothy J Warren (tim@timshomepage.net)
Flatten source structure a bit
-
2018-01-19T13:43:19-05:00 (commit #c735c27)
Author: Timothy J Warren (tim@timshomepage.net) / Commiter: Timothy J Warren (tim@timshomepage.net)
Update file headers
-
2016-10-13T21:55:23-04:00 (commit #b8d4768)
Author: Timothy J Warren (tim@timshomepage.net) / Commiter: Timothy J Warren (tim@timshomepage.net)
camelCase methods and properties
-
2016-10-12T22:12:25-04:00 (commit #6740aae)
Author: Timothy J Warren (tim@timshomepage.net) / Commiter: Timothy J Warren (tim@timshomepage.net)
PHP7 or bust!
-
2016-09-07T17:39:19-04:00 (commit #ca60162)
Author: Timothy J Warren (tim@timshomepage.net) / Commiter: Timothy J Warren (tim@timshomepage.net)
Miscellaneous cleanup and refactoring
-
2016-09-07T13:17:17-04:00 (commit #24f3b1d)
Author: Timothy J Warren (tim@timshomepage.net) / Commiter: Timothy J Warren (tim@timshomepage.net)
Update header comments
-
2016-09-07T13:10:03-04:00 (commit #bb38213)
Author: Timothy J Warren (tim@timshomepage.net) / Commiter: Timothy J Warren (tim@timshomepage.net)
Code Style fixes
-
2015-11-11T15:44:24-05:00 (commit #c0674d5)
Author: Timothy J Warren (tim@timshomepage.net) / Commiter: Timothy J Warren (tim@timshomepage.net)
Remove the last of the one line if statements