Package-level declarations
Types
Observes API operations, including standalone reads outside account write admission. These are not VFS lock counts. Native synchronous results stay synchronous. Async results remain outstanding until await completes; a transaction stays outstanding until SQLDelight's commit/rollback callback, or an observed post-commit listener failure. If native transaction end fails, its missing end remains visible rather than claiming release.
Keeps the driver alive while pausing database access before process suspension. Transactions keep admission until SQLDelight reports commit or rollback, including nested work. A failed native transaction end must not release ownership through a finally block.
Controls SQLDelight query invalidations (notifyListeners).
Fine tuning configuration for the driver. This is useful if we want to squeeze the last bit of performance out of the database. Or if we want to enable some SQLite specific features.
An existing-store failure. If cleanupUncertain is true, the account owner must retain its lease until process exit: the native driver can lose a connection during partial opening or failed close.
Provides an in-memory cache for in-memory databases.
Provides an in-memory cache for in-memory databases.
Canonical DAOs bound to the caller's single writer transaction, including all reads.
SqlDriver wrapper that can mute invalidations.
Platform-specific data used to create the database that might be necessary for future operations in the future like nuke
Platform-specific data used to create the database that might be necessary for future operations in the future like nuke
Platform-specific data used to create the database that might be necessary for future operations in the future like nuke
Platform-specific data used to create the database that might be necessary for future operations in the future like nuke
Platform-specific data used to create the database that might be necessary for future operations in the future like nuke
Dispatcher for database read operations. Limited to MAX_READ_PARALLELISM (32) concurrent reads to prevent SQLCipher connection pool exhaustion while maintaining good throughput.
Dispatcher for database write operations. Limited to MAX_WRITE_PARALLELISM (1) to serialize writes and aligning with SQLite's single-writer model.
Properties
Whether encrypted databases keep their first PLAINTEXT_HEADER_SIZE bytes readable, see setSqlCipherKey. Only iOS needs it; on macOS the whole database is encrypted, with the salt in its header, as SQLCipher does by default. It is part of the database format, so it depends on nothing but the platform.
The first bytes of an encrypted iOS database that stay unencrypted, see setSqlCipherKey. 32 is what SQLCipher recommends for this.
Functions
Clears the in-memory database for the given user. This closes the database connection and removes it from the cache, causing SQLite to delete the shared in-memory database.
Creates a JVM SQLite driver with optional SQLDelight-managed schema initialization.
Caller holds the account lease. Never creates the main database, migrates, or inserts SelfUser.
Reads the app's current database key and salt only; never generates or migrates a key.
Creates a new instance of the GlobalDatabaseBuilder.
Creates a new instance of the GlobalDatabaseBuilder.
Creates a new instance of the GlobalDatabaseBuilder.
Creates a new instance of the GlobalDatabaseBuilder.
Creates a new instance of the GlobalDatabaseBuilder.
Creates an in-memory user database, or returns an existing one if it already exists.
Creates an in-memory user database, or returns an existing one if it already exists.
Track connection creation, including connections that fail before SQLDelight registers them.
Requery retained observers after the NSE may have committed changes through its own driver.
Kalium doesn't link SQLCipher on Apple. CoreCrypto's library contains it and exports the SQLite API, and every app using Kalium links CoreCrypto, so the SQLite that SQLiter calls is SQLCipher. Plain SQLite would accept PRAGMA key and write the database unencrypted, so a connection whose SQLite isn't SQLCipher is refused.
Checks that key can encrypt a database on this platform. On iOS, it has to be SQLCipher's raw-key form with the salt, x'<64 hex digits key><32 hex digits salt>', as SecurityHelper creates it there from the key and salt it stores together. With the readable header, SQLCipher has no place to keep a salt of its own: it would encrypt a new database with a random one, and lose it.
Keys a connection with key, see requireSqlCipherKey. On iOS, also keeps the first PLAINTEXT_HEADER_SIZE bytes of the database unencrypted.
Creates a UserDatabaseBuilder for the given userId and passphrase
Creates a UserDatabaseBuilder for the given userId and passphrase
Creates a UserDatabaseBuilder for the given userId and passphrase
Creates a UserDatabaseBuilder for the given userId and passphrase
Creates a UserDatabaseBuilder for the given userId and passphrase
Opens a database driver for an arbitrary path.
Opens a database driver for an arbitrary path.
Opens a database driver for an arbitrary path.
Opens a database driver for an arbitrary path.
Opens a database driver for an arbitrary path.