Query\Drivers\DriverInterface
PDO Interface to implement for database drivers
Synopsis
interface DriverInterface
{
- // methods
- public void __construct()
- public PDOStatement prepareQuery()
- public ?array getColumns()
- public ?array getTypes()
- public ?array getIndexes()
- public ?array getFks()
- public ?array getTables()
- public ?array getSystemTables()
- public ?array getSchemas()
- public ?array getDbs()
- public ?array getViews()
- public ?array getSequences()
- public ?array getFunctions()
- public ?array getProcedures()
- public ?array getTriggers()
- public string|array quoteIdent()
- public string quoteTable()
- public PDOStatement prepareExecute()
- public ?array driverQuery()
- public int affectedRows()
- public ?int numRows()
- public string prefixTable()
- public array insertBatch()
- public array updateBatch()
- public PDOStatement truncate()
- public SQLInterface getSql()
- public AbstractUtil getUtil()
- public string getVersion()
- public string getLastQuery()
- public void setLastQuery()
- public void setTablePrefix()
Violations
PHPMessDetector
Line | Rule | Message |
---|---|---|
189 | BooleanArgumentFlag | The method driverQuery has a boolean flag argument $filteredIndex, which is a certain sign of a Single Responsibility Principle violation. |
Methods
public
- __construct() — Constructor/Connection method
- 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. Returns database list if schemas are databases for the current driver.
- 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
- getVersion() — Get the version of the database engine
- 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.