Open an SQLite database file.
The only mode supported at the moment is opening a database file for read- write access, creating it if it does not already exist. SQLite itself understands the following paths:
:memory:
is supplied then a transient in-memory
database is opened. The contents of this database are lost when the
database connection is closed.Path to a database file, or :memory:
, or the empty string.
The absolute path to the file backing this database connection.
For in-memory or temporary databases the value of this property is the empty string. If the database has been closed then a dummy string whose value should not be relied upon is returned.
This property is primarily provided for diagnostic purposes.
Close the database connection. Calling any methods on a closed database
connection will result in an error, with the exception of further calls to
close()
which will have no effect.
If any statements that have been prepared for this connection are still open then the operating system resources associated with this connection are not released until they are all closed or garbage collected.
Execute one SQL statement or multiple SQL statements separated by semicolons. Results are discarded, and parameter binding is not possible; use a prepared statement if you need to retrieve results or bind parameters.
This function is useful for running a sequence of SQL DDL commands to initialize or upgrade an application's database schema.
One or more SQL statements.
Prepare an SQL statement.
A prepared statement may end with a semicolon, although this is not recommended. If a semicolon is present then it must be the last character in the input string, otherwise an error will occur.
Returns a prepared statement object which can be repeatedly invoked with various bind parameters.
SQLite supports several different kind of bind parameter syntax. The details can be found on the following page:
SQL statement, possibly including placeholders.
Generated using TypeDoc
An SQLite database connection.