Enum Class JournalMode
- All Implemented Interfaces:
Serializable, Comparable<JournalMode>, Constable
Corresponds to the PRAGMA journal_mode setting.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic JournalModeReturns the enum constant of this class with the specified name.static JournalMode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
WAL
Write-Ahead Logging mode.Allows concurrent reads and writes, with better performance for write-intensive workloads. The default and recommended mode for most applications.
-
DELETE
Rollback journal mode (default in SQLite < 3.7.0).Creates a separate rollback journal file (
-journal) that is deleted after each transaction. -
TRUNCATE
Truncate journal mode.Similar to
DELETEbut truncates the journal file to zero bytes instead of deleting it, which can be faster on some filesystems. -
PERSIST
Persistent journal mode.The journal file is never deleted, only overwritten. Can be slightly faster than
DELETEon filesystems where file creation is expensive. -
MEMORY
Memory journal mode.The journal is kept in memory, not on disk. Transactions are atomic but not durable across application crashes.
-
OFF
No journal mode.No rollback journal is maintained. Transactions may be rolled back on application crash, leaving the database in an inconsistent state. Not recommended for production use.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-