SQLiteDatabase
Properties
Auto-vacuuming is only possible if the database stores some additional information that allows each database page to be traced backwards to its referrer. Therefore, auto-vacuuming must be turned on before any tables are created. It is not possible to enable or disable auto-vacuum after a table has been created.
Get whether this thread currently holds a connection to the database.
Returns true if any database connection managed by this database has been interrupted and has not yet completed. This method is safe to call from any thread.
Get whether the current thread has an open transaction.
Functions
Transacts to the database in exclusive mode a batch of queries with the same underlying SQL statement. The prototypical use case is for database modifications inside a tight loop to which this is optimised.
Begins a transaction in exclusive mode. Prefer transact whenever possible.
Begins a transaction in immediate mode. Prefer transact whenever possible.
Configures a database connection using sqlite3_db_config. This is intended for boolean-style configuration options such as SQLITE_DBCONFIG_DEFENSIVE (1010).
The incremental vacuum pragma causes pages to be removed from the freelist. The database file is truncated by the same number of pages. The incremental vacuum pragma has no effect if the database is not already in incremental vacuum mode or if there are no pages on the freelist.
The incremental vacuum pragma causes up to N pages to be removed from the freelist. The database file is truncated by the same amount. The incremental vacuum pragma has no effect if the database is not already in incremental mode or if there are no pages on the freelist. If there are fewer on the freelist, or if pages is less than 1, then the entire freelist is cleared.
Executes a cancellable query. If the cancellationSignal is cancelled from another thread, the query will be aborted at the earliest opportunity and an OperationCancelledException will be thrown.
Setting foreign key constraints is not possible within a transaction; foreign key constraint enforcement may only be enabled or disabled when there are no pending transactions.
Registers a progress handler that is invoked periodically during long-running SQL statements on all database connections managed by this database. If the handler returns non-zero, the operation is interrupted.
Execute a block inside either an exclusive or an immediate database transaction. These transaction modes are the same in WAL-journal mode; in other journal modes, exclusive transaction mode prevents other connections from reading the database while the transaction is underway.
Modifies the contents of a blob; it is not possible to increase the size of a blob using this method.
Temporarily end the transaction to allow other threads to make progress. The transaction is assumed to be successful thus far and committed, do not call setTransactionSuccessful. When this method returns a new transaction will have been created but not yet marked as successful.