Query\Drivers\Sqlite\Driver
SQLite specific class
Synopsis
- // members
- protected PDOStatement $statement;
- 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 mixed get_tables()
- public array get_fks()
- public string 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
- $escape_char
—
string
Character to escape identifiers - $has_truncate
—
Query\Drivers\Sqlite\bool
SQLite has a truncate optimization, but no support for the actual keyword - $has_truncate
—
Query\bool
Whether the driver supports 'TRUNCATE' - $last_query
—
string
Last query executed - $sql
—
Query\SQL_Interface
Reference to sql class - $statement
—
Query\Drivers\Sqlite\PDOStatement
Reference to the last executed sql query - $statement
—
\PDOStatement
Reference to the last executed query - $table_prefix
—
string
Prefix to apply to table names - $util
—
Query\Abstract_Util
Reference to util class
Methods
public
- __construct() — Open SQLite Database
- get_fks() — Retrieve foreign keys for the table
- get_tables() — List tables for the current database
- insert_batch() — Create sql for batch insert
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-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-20T15:24:21-04:00 (commit #cd7f904)
Author: Timothy J. Warren (tim@timshomepage.net) / Commiter: Timothy J. Warren (tim@timshomepage.net)
Add pdo_firebird driver
-
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-28T16:41:46-04:00 (commit #6a38213)
Author: Timothy J. Warren (tim@timshomepage.net) / Commiter: Timothy J. Warren (tim@timshomepage.net)
Improve some tests and docblocks
-
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-17T16:41:12-04:00 (commit #d6c0fd2)
Author: Timothy J. Warren (tim@timshomepage.net) / Commiter: Timothy J. Warren (tim@timshomepage.net)
Add update and delete rules to foreign key methods
-
2014-04-15T16:15:08-04:00 (commit #80595df)
Author: Timothy J. Warren (tim@timshomepage.net) / Commiter: Timothy J. Warren (tim@timshomepage.net)
Update foreign key driver methods to return the same kind of information
-
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-03T16:49:01-04:00 (commit #3eeea75)
Author: Timothy J. Warren (tim@timshomepage.net) / Commiter: Timothy J. Warren (tim@timshomepage.net)
Cut down on some duplication, and increase test coverage
-
2014-04-03T14:44:03-04:00 (commit #a333920)
Author: Timothy J. Warren (tim@timshomepage.net) / Commiter: Timothy J. Warren (tim@timshomepage.net)
Rename db_util to abstract_util, mark create_table method as deprecated
-
2014-04-03T13:28:30-04:00 (commit #4809016)
Author: Timothy J. Warren (tim@timshomepage.net) / Commiter: Timothy J. Warren (tim@timshomepage.net)
Add insert_batch methods to Firebird and SQLite
-
2014-04-02T17:08:50-04:00 (commit #e3fdad5)
Author: Timothy J. Warren (tim@timshomepage.net) / Commiter: Timothy J. Warren (tim@timshomepage.net)
Namespaces!
-
2014-03-26T20:49:33-04:00 (commit #846e68a)
Author: Timothy J. Warren (tim@timshomepage.net) / Commiter: Timothy J. Warren (tim@timshomepage.net)
Add interface for pdo drivers to enforce the same interface on the Firebird driver
-
2014-03-17T19:45:41-04:00 (commit #97730f0)
Author: Timothy J. Warren (tim@timshomepage.net) / Commiter: Timothy J. Warren (tim@timshomepage.net)
Fix some code quality issues
-
2014-03-17T19:35:25-04:00 (commit #2b4154a)
Author: Scrutinizer Auto-Fixer (auto-fixer@scrutinizer-ci.com) / Commiter: Scrutinizer (auto-fixer@scrutinizer-ci.com)
Scrutinizer Auto-Fixes This patch was automatically generated as part of the following inspection: https://scrutinizer-ci.com/g/timw4mail/Query/inspections/89ed2aa4-7aae-45bb-9289-ebb27a60ef13 Enabled analysis tools: - PHP Analyzer