DatabaseSync
This class represents a single connection to a SQLite database. All APIs exposed by this class execute synchronously.
Since
v22.5.0
Functions
An exception is thrown if the database is not open. This method is a wrapper around sqlite3changeset_apply()
.
Closes the database connection. An exception is thrown if the database is not open. This method is a wrapper around sqlite3_close_v2()
.
Creates and attaches a session to the database. This method is a wrapper around sqlite3session_create()
and sqlite3session_attach()
.
Enables or disables the loadExtension
SQL function, and the loadExtension()
method. When allowExtension
is false
when constructing, you cannot enable loading extensions for security reasons.
This method allows one or more SQL statements to be executed without returning any results. This method is useful when executing SQL statements read from a file. This method is a wrapper around sqlite3_exec()
.
This method is used to create SQLite user-defined functions. This method is a wrapper around sqlite3_create_function_v2()
.
Loads a shared library into the database connection. This method is a wrapper around sqlite3_load_extension()
. It is required to enable the allowExtension
option when constructing the DatabaseSync
instance.
Compiles a SQL statement into a prepared statement. This method is a wrapper around sqlite3_prepare_v2()
.