DatabaseSync
This class represents a single connection to a SQLite database. All APIs exposed by this class execute synchronously.
Since
v22.5.0
Properties
Whether the database is currently within a transaction. This method is a wrapper around sqlite3_get_autocommit().
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().
Creates a new SQLTagStore, which is an LRU (Least Recently Used) cache for storing prepared statements. This allows for the efficient reuse of prepared statements by tagging them with a unique identifier.
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.
This method is a wrapper around sqlite3_db_filename()
Compiles a SQL statement into a prepared statement. This method is a wrapper around sqlite3_prepare_v2().
Sets an authorizer callback that SQLite will invoke whenever it attempts to access data or modify the database schema through prepared statements. This can be used to implement security policies, audit access, or restrict certain operations. This method is a wrapper around sqlite3_set_authorizer().