Package-level declarations
Types
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.
Provides an in-memory cache for in-memory databases.
Provides an in-memory cache for in-memory databases.
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.
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.
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.