-
Notifications
You must be signed in to change notification settings - Fork 717
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature: Add function to set journal mode on sqlite databases (apollo…
- Loading branch information
1 parent
5f52953
commit 70c3447
Showing
3 changed files
with
30 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import Foundation | ||
|
||
public enum JournalMode: String { | ||
/// The rollback journal is deleted at the conclusion of each transaction. This is the default behaviour. | ||
case delete = "DELETE" | ||
/// Commits transactions by truncating the rollback journal to zero-length instead of deleting it. | ||
case truncate = "TRUNCATE" | ||
/// Prevents the rollback journal from being deleted at the end of each transaction. Instead, the header | ||
/// of the journal is overwritten with zeros. | ||
case persist = "PERSIST" | ||
/// Stores the rollback journal in volatile RAM. This saves disk I/O but at the expense of database | ||
/// safety and integrity. | ||
case memory = "MEMORY" | ||
/// 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. | ||
case wal = "WAL" | ||
/// Disables the rollback journal completely | ||
case off = "OFF" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters