DatabaseConnection
A database connection, opened through ksqlite.kapi.SQLite.open.
Unless documented otherwise, every member throws IllegalStateException once this connection is closed.
Properties
Cipher configuration operating on this connection.
Cipher data for this connection.
Configuration of the connection.
Low-level file control operations on the underlying VFS.
Whether the connection is in autocommit mode.
Whether an interrupt is currently in effect.
Rowid of the most recent successful INSERT into a rowid table or virtual table on this connection.
Total number of rows inserted, modified or deleted by all INSERT, UPDATE or DELETE statements completed since the database connection was opened, including those executed as part of trigger programs.
Write-Ahead Log operating on this connection.
Functions
Convenience overload of createCollation using UTF-8 encoding, the only one currently supported.
Creates the aggregate function name(argumentCount), or replaces it if one was already created with the same name, argument count and encoding, and returns a handle that removes it again once closed.
Creates the scalar function name(argumentCount), or replaces it if one was already created with the same name, argument count and encoding, and returns a handle that removes it again once closed.
Creates the window function name(argumentCount), or replaces it if one was already created with the same name, argument count and encoding, and returns a handle that removes it again once closed.
Convenience overload of createFunction using UTF-8 encoding, the only one currently supported.
Creates the virtual table module name, or replaces it if one was already created with that name, and returns a handle that removes it again once closed. The table module connects to can either be referenced directly by name in SQL, with no CREATE VIRTUAL TABLE needed, or explicitly created like a VirtualTableModule.Regular one.
Creates the virtual table module name, or replaces it if one was already created with that name, and returns a handle that removes it again once closed. The table module connects to can only be referenced directly by name in SQL, CREATE VIRTUAL TABLE is not supported for it.
Creates the virtual table module name, or replaces it if one was already created with that name, and returns a handle that removes it again once closed. module must implement its create and connect functions differently, since SQLite only creates the backing table once but connects to it every time it is referenced.
Disconnects from database and then reopens database as an in-memory database based on the serialization contained in serializedDatabase. The serializedDatabase is databaseSize bytes in size. bufferSize is the size of the buffer serializedDatabase, which might be larger than databaseSize. If bufferSize is larger than databaseSize, and the SqliteDeserializeFlag.READONLY bit is not set in flags, then SQLite is permitted to add content to the in-memory database as long as the total size does not exceed bufferSize bytes.
Writes any dirty pages in the pager cache that are not currently in use. The operation only takes place if there is a write transaction open at the time this function is called.
Returns the absolute pathname of database, or null for a temporary or in-memory database.
Returns the current value of the given limit category.
Returns the current transaction state of database.
Returns true if the database database is read-only, or false If it is read/write.
Creates and returns a PreparedStatement.
Attempts to scan the WAL file associated with database of this connection and make all valid snapshots available to openSnapshot.
Attempts to free as much heap memory as possible from this connection.
Serializes database into a SerializeResult. Whether the returned buffer is owned by SQLite or by the caller depends on flags, see SerializeResult.Immutable and SerializeResult.Mutable.
Sets the callback invoked while an SQL statement is being compiled by prepare, once per action it would perform, to allow or deny each one.
Sets the callback that is invoked prior to each autovacuum of the database file.
Sets the callback that might be invoked whenever an attempt is made to access a database table associated with this connection when another thread or process has the table locked.
Sets a BusyHandler that sleeps for a specified amount of time when a table is locked. Any BusyHandler previously passed to setBusyHandler is replaced.
Sets a BusyHandler that sleeps for a specified amount of time when a table is locked. Any BusyHandler previously passed to DatabaseConnection.setBusyHandler is replaced.
Sets the callback invoked whenever an undefined collation sequence is required.
Sets the callback invoked right before a transaction commits.
Enables or disables extended result codes, which report failures in more detail than the primary ksqlite.types.SqliteResultCode alone.
Sets the value of the given limit category.
Sets the callback that is invoked prior to each INSERT, UPDATE, and DELETE operation.
Sets handler to be invoked every operationCount internal VM instructions during long-running calls, or clears it if operationCount is not positive.
Sets the callback invoked whenever a transaction is rolled back.
Sets the callback invoked whenever any of the events identified by eventCodes occur, or clears it if eventCodes is null.
Sets the callback that is invoked whenever a row is updated, inserted or deleted in a rowid table.