Query\Driver_Interface
PDO Interface to implement for database drivers
Synopsis
interface Driver_Interface
{
- // methods
- public void __construct()
- public PDOStatement prepare_query()
- public bool beginTransaction()
- public bool commit()
- public mixed errorCode()
- public array errorInfo()
- public int exec()
- public mixed getAttribute()
- public bool rollback()
- public bool setAttribute()
- public array get_columns()
- public array get_types()
- public array get_indexes()
- public array get_fks()
- public array get_tables()
- public array get_system_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 string|array quote_ident()
- public string|array quote_table()
- public PDOStatement prepare_execute()
- public SQL_Interface get_sql()
- public Abstract_Util get_util()
- public array driver_query()
- public int affected_rows()
- public int num_rows()
- public string prefix_table()
- public array insert_batch()
Methods
public
- __construct() — Constructor/Connection method
- affected_rows() — Returns number of rows affected by an INSERT, UPDATE, DELETE type query
- beginTransaction() — Begin a transaction
- commit() — Commit a transaction
- driver_query() — Method to simplify retrieving db results for meta-data queries
- errorCode() — Return the current error code
- errorInfo() — Return information about the current error
- exec() — Execute an SQL statement and return the number of affected rows
- getAttribute() — Get a connection attribute for the current db driver
- 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_procedures() — Return list of stored procedures for the current database
- 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
- rollback() — Rollback a transaction
- setAttribute() — Set a connection attribute