SqliteStorage
Storage implementation based on Kotlin Multiplatform SQLiteConnection API.
One limitation of SQLiteConnection APIs is that there is no way to get result from UPDATE
and DELETE
SQL statements. This can be worked around either using SQLite-specific RETURNING
clause (without breaking atomicity) or by additional SELECT
statements (this does break atomicity).
Note: currently we use this implementation only for iOS as there are multiple problems using this code on Android:
required androidx.sqlite library version (2.5.0-alpha12) conflicts with some other commonly used Android libraries.
implementation supplied by AndroidSQLiteDriver lacks support for SQLite-specific
RETURNING
clause and thus it is not possible to guarantee truly atomic operations (most notably insertions with unique keys and correct return value from deletions).