Skip to content

//selekt-api/com.bloomberg.selekt/SQLiteJournalMode

SQLiteJournalMode

[jvm]\ enum SQLiteJournalMode : Enum<SQLiteJournalMode>

Since

v0.1.0.

Entries

DELETE [jvm]
DELETE
The DELETE journaling mode is the normal behavior. In the DELETE mode, the rollback journal is deleted at the conclusion of each transaction. Indeed, the delete operation is the action that causes the transaction to commit.
MEMORY [jvm]
MEMORY
The MEMORY journaling mode stores the rollback journal in volatile RAM. This saves disk I/O but at the expense of database safety and integrity. If the application using SQLite crashes in the middle of a transaction when the MEMORY journaling mode is set, then the database file will very likely go corrupt.
OFF [jvm]
OFF
The OFF journaling mode disables the rollback journal completely. No rollback journal is ever created and hence there is never a rollback journal to delete. The OFF journaling mode disables the atomic commit and rollback capabilities of SQLite. The ROLLBACK command no longer works; it behaves in an undefined way. Applications must avoid using the ROLLBACK command when the journal mode is OFF. If the application crashes in the middle of a transaction when the OFF journaling mode is set, then the database file will very likely go corrupt. Without a journal, there is no way for a statement to unwind partially completed operations following a constraint error. This might also leave the database in a corrupted state.
PERSIST [jvm]
PERSIST
The PERSIST journaling mode prevents the rollback journal from being deleted at the end of each transaction. Instead, the header of the journal is overwritten with zeros. This will prevent other database connections from rolling the journal back. The PERSIST journaling mode is useful as an optimization on platforms where deleting or truncating a file is much more expensive than overwriting the first block of a file with zeros.
TRUNCATE [jvm]
TRUNCATE
The TRUNCATE journaling mode commits transactions by truncating the rollback journal to zero-length instead of deleting it. On many systems, truncating a file is much faster than deleting the file since the containing directory does not need to be changed.
WAL [jvm]
WAL
The WAL journaling mode uses a write-ahead log instead of a rollback journal to implement transactions. The WAL journaling mode is persistent; after being set it stays in effect across multiple database connections and after closing and reopening the database.

Properties

Name Summary
databaseConfiguration [jvm]
@JvmField
val databaseConfiguration: DatabaseConfiguration
entries [jvm]
val entries: EnumEntries<SQLiteJournalMode>
Returns a representation of an immutable list of all enum entries, in the order they're declared.
name [jvm]
val name: String
ordinal [jvm]
val ordinal: Int

Functions

Name Summary
valueOf [jvm]
fun valueOf(value: String): SQLiteJournalMode
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
values [jvm]
fun values(): Array<SQLiteJournalMode>
Returns an array containing the constants of this enum type, in the order they're declared.