eygraber
01/13/2025, 4:45 PMrocketraman
01/13/2025, 6:39 PMrocketraman
01/13/2025, 6:40 PMeygraber
01/13/2025, 6:42 PMrocketraman
01/13/2025, 6:44 PMeygraber
01/13/2025, 6:48 PMeygraber
01/13/2025, 6:49 PMrocketraman
01/13/2025, 7:05 PMrocketraman
01/13/2025, 7:11 PMeygraber
01/13/2025, 7:42 PMSQLDelight already serves as my API abstraction, so does this matter?It abstracts away driver creation, which is not as big of a deal as the rest of the abstraction, but every little bit counts.
> so you don't have to rely on the platform one, and can use the latest version of sqlite.
Hmm, isn't it the other way around?Nope, on Android if you use the SQLDelight provided AndroidSqliteDriver the version of SQLite used depends on the API version of Android. That means you need to do API version checks before using certain SQLite APIs and provide fallbacks (if possible) for previous versions.
Hmm, the android driver in SQLDelight already uses androidx-sqliteSort of 馃檭 In google's latest questionable naming choice, they reused
androidx.sqlite
even though it currently exists as a wrapper around the platform's android.database
.
The "new one" (which my library uses) is a complete break from the original androidx.sqlite
and android.database
and doesn't use any of those APIs.
If offers a completely new KMP API, with several implementations:
1. A wrapper around platform APIs
2. An implementation that uses a SQLite binary that Google builds from SQLite source
From their docs:
The recommended implementation to use is BundledSQLiteDriver available in androidx.sqlite:sqlite-bundled. It includes the SQLite library compiled from source, offering the most up-to-date version and consistency across all the supported KMP platforms.The key here is that this implementation is used across all targets, so e.g. on native, sqliter isn't used. Android, iOS, JVM, Linux, and Mac all use the same abstraction and implementation.
rocketraman
01/13/2025, 7:45 PM讗诇讬讛讜 讛讚住
01/14/2025, 2:11 PMrocketraman
01/14/2025, 2:14 PM讗诇讬讛讜 讛讚住
01/14/2025, 2:18 PMeygraber
01/14/2025, 2:31 PM