# sqldelight

SQLDelight generates typesafe Kotlin APIs from SQL statements, verifies schemas and migrations at compile time, and provides IDE features such as autocomplete and refactoring.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Migrating a Real Android App to Kotlin Multiplatform 4/4 -- Shipping WebAssembly to Productio

DevFeed: [Migrating a Real Android App to Kotlin Multiplatform 4/4 -- Shipping WebAssembly to Productio](<https://devfeed.tech/articles/migrating-a-real-android-app-to-kotlin-multiplatform-4-4-shipping-webassembly-to-productio-140455.md>)

Original publisher: [Read original article](<https://proandroiddev.com/migrating-a-real-android-app-to-kotlin-multiplatform-4-4-shipping-webassembly-to-productio-e863738a8151?source=rss----c72404660798---4>)

Author: Daniel Voko

Published: 2026-11-17T19:49:30Z

Content type: article

Language: en

Sources: [ProAndroidDev](<https://devfeed.tech/sources/proandroiddev-medium.md>)

Topics: [compose-multiplatform](<https://devfeed.tech/topics/compose-multiplatform.md>), [multiplatform](<https://devfeed.tech/topics/multiplatform.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [compose-for-web](<https://devfeed.tech/topics/compose-for-web.md>), [performance-optimization](<https://devfeed.tech/topics/performance-optimization.md>), [Gradle](<https://devfeed.tech/topics/gradle.md>), [sqldelight](<https://devfeed.tech/topics/sqldelight.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-app-development](<https://devfeed.tech/tags/android-app-development.md>), [androiddev](<https://devfeed.tech/tags/androiddev.md>), [compose-multiplatform](<https://devfeed.tech/tags/compose-multiplatform.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [kmp](<https://devfeed.tech/tags/kmp.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-multiplatform](<https://devfeed.tech/tags/kotlin-multiplatform.md>), [multiplatform](<https://devfeed.tech/tags/multiplatform.md>), [production](<https://devfeed.tech/tags/production.md>), [splash-screen](<https://devfeed.tech/tags/splash-screen.md>), [the-web](<https://devfeed.tech/tags/the-web.md>), [webassembly](<https://devfeed.tech/tags/webassembly.md>)

### AI overview

A Kotlin Multiplatform app that builds for WebAssembly still needs browser-specific production work. The excerpt describes an inline HTML splash screen for a roughly 19 MB bundle, a spinner with visible timeout and error states instead of a misleading byte-based progress bar, and browser-history navigation whose fragment routes must stay synchronized with backend redirects. It also covers a server-side image proxy needed because Strava's CDN lacks CORS headers, with requests tagged by client so native apps keep using original URLs. In the browser, SQLDelight uses sql.js with a hand-maintained schema mirror, creating a risk that schema changes break web only. A deployed-origin `blob:` media issue required a custom Coil mapper and fetcher. These examples show how browser loading, routing, security, storage and media behavior can affect architecture and maintenance.

### Source excerpt

The wasm build runs locally in minutes. ./gradlew wasmJsBrowserDevelopmentRun, a browser tab opens, the app is there. It feels finished. It isn't, and the reason is the subject of this article. The browser isn't a fourth target that happens to render the same Compose code. It's a host with its own rules about what paints when, who owns navigation, what a page is allowed to fetch, and what a database even is. Compose Multiplatform hides none of that -- it just gets your UI onto the canvas, and then you're in someone else's house. Getting a multiplatform app to build is different from making it production-ready. Everything below is a thing that worked locally and didn't work for users. Nothing paints until the bundle arrives On Android, the launcher draws your icon the instant the user taps it. The OS owns that moment, and you get it for free. On the web you get nothing. A blank page, for as long as it takes to fetch a wasm bundle -- around 19MB -- uncompressed, and around 6.5MB Brotli transfer size -- and compile it. Users don't read that as "loading", they read it as broken, and they leave before the first frame. So the first thing I had to write for the web was something Android had given me for a decade: a splash screen. It lives inline in index.html, CSS and all, specifically so it costs no request of its own -- a splash that waits on a stylesheet defeats the purpose. The color values are a hand-copied duplicate of the theme tokens in core:designsystem, so the canvas takes over without a colour change. It's duplication I'd normally reject, and here there's no alternative: the theme lives in Kotlin inside the bundle that hasn't downloaded yet. It also has a known flaw I decided to keep. The splash follows the OS colour scheme, while the app also honours a theme the user picked by hand in settings. Someone who forced the theme against their OS gets one flash at the handover. Reading their choice would mean parsing the stored settings JSON from plain JavaScript, and coup

## Migrating a Real Android App to Kotlin Multiplatform 2/4 -- What Moved for Free, and What Hurt

DevFeed: [Migrating a Real Android App to Kotlin Multiplatform 2/4 -- What Moved for Free, and What Hurt](<https://devfeed.tech/articles/migrating-a-real-android-app-to-kotlin-multiplatform-2-4-what-moved-for-free-and-what-hurt-113141.md>)

Original publisher: [Read original article](<https://proandroiddev.com/migrating-a-real-android-app-to-kotlin-multiplatform-2-4-what-moved-for-free-and-what-hurt-7ec973002f01?source=rss----c72404660798---4>)

Author: Daniel Voko

Published: 2026-11-02T14:51:13Z

Content type: article

Language: en

Sources: [ProAndroidDev](<https://devfeed.tech/sources/proandroiddev-medium.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [koin](<https://devfeed.tech/topics/koin.md>), [Ktor](<https://devfeed.tech/topics/ktor.md>), [sqldelight](<https://devfeed.tech/topics/sqldelight.md>), [Android](<https://devfeed.tech/topics/android.md>), [CI/CD](<https://devfeed.tech/topics/cicd.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-app-development](<https://devfeed.tech/tags/android-app-development.md>), [androiddev](<https://devfeed.tech/tags/androiddev.md>), [apis](<https://devfeed.tech/tags/apis.md>), [app](<https://devfeed.tech/tags/app.md>), [code](<https://devfeed.tech/tags/code.md>), [compose-multiplatform](<https://devfeed.tech/tags/compose-multiplatform.md>), [constructor](<https://devfeed.tech/tags/constructor.md>), [context](<https://devfeed.tech/tags/context.md>), [coupling](<https://devfeed.tech/tags/coupling.md>), [dependencies](<https://devfeed.tech/tags/dependencies.md>), [dependency](<https://devfeed.tech/tags/dependency.md>), [dependency-injection](<https://devfeed.tech/tags/dependency-injection.md>), [di](<https://devfeed.tech/tags/di.md>), [files](<https://devfeed.tech/tags/files.md>), [implementation](<https://devfeed.tech/tags/implementation.md>), [init](<https://devfeed.tech/tags/init.md>), [interface](<https://devfeed.tech/tags/interface.md>), [kmp](<https://devfeed.tech/tags/kmp.md>), [koin](<https://devfeed.tech/tags/koin.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-multiplatform](<https://devfeed.tech/tags/kotlin-multiplatform.md>), [multiplatform](<https://devfeed.tech/tags/multiplatform.md>)

### AI overview

The author reports that roughly 84% of the app's Kotlin code moved to commonMain, but migration effort depended more on the app's platform coupling than on library support. Ktor's client configuration and request logic moved unchanged; SQLDelight's schema and queries were already platform agnostic, though its web WebWorkerDriver stores data only in memory. Koin modules bind platform implementations to shared interfaces when construction needs platform dependencies; this avoids some expect/actual constraints but makes missing bindings runtime failures. The excerpt recommends building a second target in CI early because Android builds can miss Android-only dependencies leaking into shared code. Replacing pervasive java.time usage was the hardest work: kotlinx-datetime helped, while locale-aware date formatting needed custom implementations using java.time on Android, Intl.DateTimeFormat on wasm, and NSDate on iOS. File uploads use a lazy, repeatable byte-source boundary; Android and iOS can stream, while the web implementation buffers chunks because browser reads are asynchronous and kotlinx-io's RawSource is synchronous. Multiplatform Settings with kotlinx.serialization handles key-

### Source excerpt

Migrating a Real Android App to Kotlin Multiplatform 2/4 -- What Moved for Free, and What HurtPart 2: What Moved for Free, and What Hurt In Part 1 I described the foundations: a modular Android codebase with Ktor, Koin and SQLDelight already in place, and a rule that the Android app must stay shippable after every step. The result is that around 84% of the Kotlin code now lives in commonMain. What that number hides is how unevenly the work was distributed. Some layers moved almost mechanically, in an afternoon, with a plugin swap and a few imports. Others took weeks and touched code I hadn't looked at in years. The pattern turned out to be simple, and in hindsight obvious: multiplatform support in your libraries matters far less than how tightly your own code is coupled to platform APIs. A library either supports KMP or it doesn't, and you find out in minutes. Your own platform coupling is spread across hundreds of files and you find out gradually, for weeks. What moved for freeKoin Dependency injection is the piece I'd underrate if I were writing this list from memory, and it deserves more credit than that. Koin ended up being the mechanism that keeps platform code out of shared code. Instead of reaching for expect / actual every time a component needs a platform implementation, the shared code depends on an interface, and each platform contributes a module that binds it: https://medium.com/media/a9ac7c95779230353cc1e3f0943e48b7/href expect/actual works well for small, self-contained things: a platform name, a formatter, a UUID generator. It gets awkward as soon as a platform implementation needs its own dependencies. The declaration in commonMain fixes the constructor signature for every target, so an Android implementation that needs a Context has to get it some other way, usually through an init step the platform has to remember to call. With a DI module, shared code depends on an interface and nothing else. Each platform binds its own implementation, with whatev

## Under the Hood: How Room 3.0 and SQLDelight 2.x Detect Database Changes

DevFeed: [Under the Hood: How Room 3.0 and SQLDelight 2.x Detect Database Changes](<https://devfeed.tech/articles/under-the-hood-how-room-3-0-and-sqldelight-2-x-detect-database-changes-107102.md>)

Original publisher: [Read original article](<https://proandroiddev.com/under-the-hood-how-room-3-0-and-sqldelight-2-x-detect-database-changes-51e7a9b716dc?source=rss----c72404660798---4>)

Author: chanzmao

Published: 2026-10-29T17:35:32Z

Content type: comparison

Language: en

Sources: [ProAndroidDev](<https://devfeed.tech/sources/proandroiddev-medium.md>)

Topics: [sqldelight](<https://devfeed.tech/topics/sqldelight.md>), [Query (disambiguation)](<https://devfeed.tech/topics/query.md>)

Tags: [android-app-development](<https://devfeed.tech/tags/android-app-development.md>), [android-development](<https://devfeed.tech/tags/android-development.md>), [changes](<https://devfeed.tech/tags/changes.md>), [database](<https://devfeed.tech/tags/database.md>), [flow](<https://devfeed.tech/tags/flow.md>), [kotlin-coroutines](<https://devfeed.tech/tags/kotlin-coroutines.md>), [mobile-app-development](<https://devfeed.tech/tags/mobile-app-development.md>), [notifications](<https://devfeed.tech/tags/notifications.md>), [query](<https://devfeed.tech/tags/query.md>), [room](<https://devfeed.tech/tags/room.md>), [software-architecture](<https://devfeed.tech/tags/software-architecture.md>), [sqldelight](<https://devfeed.tech/tags/sqldelight.md>), [tables](<https://devfeed.tech/tags/tables.md>)

### AI overview

Room 3.0 observes table invalidations: its Flow runs the query when collection starts, then reruns it after a relevant table change. This can rerun a query even when its result is unchanged; cancellation stops the observation. SQLDelight 2.x attaches a listener to a Query. `Query.asFlow()` emits the query as a notification, while downstream operators such as `mapToList()` execute SQL and fetch rows; listener cleanup occurs when collection closes or is cancelled. Neither mechanism avoids reading from the database after a relevant notification. The text cautions that SQLDelight's query-level listener does not guarantee fewer executions or prove that only affected queries are notified; behavior depends on notification and driver implementation details.

### Source excerpt

Room and SQLDelight both let us observe database queries as Kotlin Flows. When the underlying data changes, the Flow emits an update, allowing the UI to react without manually refreshing the data. Image created by AI The result looks similar from the outside, but the two libraries handle change notifications differently. Room relies on InvalidationTracker to monitor database tables. SQLDelight uses listeners attached to individual Query objects. Let's look at how these mechanisms work internally and what the differences mean in practice. How Room 3.0 Monitors Database Changes Room uses InvalidationTracker to keep track of changes to database tables. When a DAO query returns a Flow, Room uses this mechanism to determine when the query should run again. The important detail is that Room tracks which tables a query depends on, rather than tracking changes to the query result itself. What happens behind the scenes? The following example illustrates the basic idea. It is simplified pseudocode, not Room's actual implementation. fun <T> createRoomQueryFlow( tracker: InvalidationTracker, tables: Array<String>, queryBlock: suspend () -> T ): Flow<T> = flow { emit(queryBlock()) tracker.createFlow(*tables).collect { emit(queryBlock()) } } There are two things worth noting here. The query runs before change monitoring begins. When collection starts, queryBlock() fetches the current data and emits the result. The Flow then observes invalidation events from InvalidationTracker. A table change can trigger another query execution. Suppose a query reads from the users table. When Room detects a relevant change to that table, the Flow can emit another result by executing the query again. Room does not need to compare the old and new query results. It uses table invalidation as a signal that the result may have changed. This approach keeps the mechanism straightforward, but it has a trade-off: a change to a table can trigger re-execution even when the actual result of a particular que

## Introducing Apollo Kotlin

DevFeed: [Introducing Apollo Kotlin](<https://devfeed.tech/articles/introducing-apollo-kotlin-23408.md>)

Original publisher: [Read original article](<https://www.apollographql.com/blog/introducing-apollo-kotlin>)

Author: Martin Bonnin

Published: 2021-12-16T15:15:14Z

Content type: release

Language: en

Sources: [Apollo Blog](<https://devfeed.tech/sources/apollo-blog.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [GraphQL](<https://devfeed.tech/topics/graphql.md>), [Cache](<https://devfeed.tech/topics/cache.md>), [sqldelight](<https://devfeed.tech/topics/sqldelight.md>), [runBlocking](<https://devfeed.tech/topics/runblocking.md>), [Android](<https://devfeed.tech/topics/android.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [announce](<https://devfeed.tech/tags/announce.md>), [announcement](<https://devfeed.tech/tags/announcement.md>), [apollo](<https://devfeed.tech/tags/apollo.md>), [caching](<https://devfeed.tech/tags/caching.md>), [client](<https://devfeed.tech/tags/client.md>), [graphql](<https://devfeed.tech/tags/graphql.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [server](<https://devfeed.tech/tags/server.md>)

### AI overview

Apollo Kotlin 3 renames and unifies Apollo Android's artifacts into a Kotlin-based GraphQL client, with multiplatform support for Android, JS, iOS, macOS, and Linux. It generates typed models from GraphQL queries and provides a caching client. The excerpt lists coroutine APIs, optional response-based code generation that models fragments as interfaces, faster SQLite cache reads through batching, test builders, compile-time cache ID directives, and an @nonnull directive that catches nulls during parsing. Apollo Kotlin 3 was available on Maven Central; Apollo Android 2 users are directed to migration guidance. The excerpt ends during the codegen section, so it does not establish further details.

### Source excerpt

We're thrilled to announce Apollo Kotlin! For the past while we've been heads down converting Apollo Android to be 100% Kotlin based, which means Apollo Android now works with any Kotlin based application, website or even server. Because of this, we're renaming the project to Apollo Kotlin! Apollo Kotlin is a type-safe, caching GraphQL client.

## Going Fully Multiplatform #1: Migrating your Android Project to Kotlin Multiplatform

DevFeed: [Going Fully Multiplatform #1: Migrating your Android Project to Kotlin Multiplatform](<https://devfeed.tech/articles/going-fully-multiplatform-1-migrating-your-android-project-to-kotlin-multiplatform-25912.md>)

Original publisher: [Read original article](<https://medium.com/@xxfast/going-fully-multiplatform-1-migrating-your-android-project-to-kotlin-multiplatform-8fc38763307?source=rss-43bae76e8f81------2>)

Author: Isuru Rajapakse

Published: 2021-10-21T13:24:07Z

Content type: article

Language: en

Sources: [Isuru Rajapakse](<https://devfeed.tech/sources/stories-by-isuru-rajapakse-on-medium.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Android](<https://devfeed.tech/topics/android.md>), [compose-multiplatform](<https://devfeed.tech/topics/compose-multiplatform.md>), [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>), [koin](<https://devfeed.tech/topics/koin.md>), [Ktor](<https://devfeed.tech/topics/ktor.md>), [sqldelight](<https://devfeed.tech/topics/sqldelight.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [api](<https://devfeed.tech/tags/api.md>), [caching](<https://devfeed.tech/tags/caching.md>), [compose](<https://devfeed.tech/tags/compose.md>), [coroutine](<https://devfeed.tech/tags/coroutine.md>), [declarative](<https://devfeed.tech/tags/declarative.md>), [declarative-ui](<https://devfeed.tech/tags/declarative-ui.md>), [dependency-injection](<https://devfeed.tech/tags/dependency-injection.md>), [imperative](<https://devfeed.tech/tags/imperative.md>), [ios](<https://devfeed.tech/tags/ios.md>), [jetbrains](<https://devfeed.tech/tags/jetbrains.md>), [jetpack](<https://devfeed.tech/tags/jetpack.md>), [jvm](<https://devfeed.tech/tags/jvm.md>), [koin](<https://devfeed.tech/tags/koin.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-multiplatform](<https://devfeed.tech/tags/kotlin-multiplatform.md>), [ktor](<https://devfeed.tech/tags/ktor.md>), [moshi](<https://devfeed.tech/tags/moshi.md>), [navigation](<https://devfeed.tech/tags/navigation.md>), [project](<https://devfeed.tech/tags/project.md>)

### AI overview

The author describes migrating a long-running Android-only app, targeting Android, JVM, iOS, and web. The existing stack uses OkHttp and Retrofit for networking, Moshi for serialization, Okio for caching, Koin, RxJava, Conductor, and XML Android Views. The planned multiplatform stack replaces these with Ktor, Kotlin Serialization, SQLDelight, Coroutine Flows, Decompose, and declarative UI with Jetpack/JetBrains Compose; Koin remains. The excerpt presents this as a plan and says later articles will cover the steps and project modularization, so it does not establish implementation results.

### Source excerpt

Earlier this year I started a mission to start migrating one of our long-lasting Android-only apps to Kotlin Multiplatform to go beyond just Android. This is the story of how that went. Migration from Only-Android to Kotlin Multiplatform!The Android stack This is our current "stack" our android app was set up as follows Targeting Android SDK API 23 or above, we had a few libraries to help us out. The Android-only stack OkHttp for Networking Retrofit for.. also Networking Moshi for serialisation Okio for caching Koin for Dependency Injection/ Service Locator Plumbing with RxJava Navigation with Conductor Imperative UI with Android Views written in XML The Multiplatform stack To go beyond just Android, I had to make some hard decisions to step outside of the comfort zone that we've been so fond of To target Android, JVM, iOS and Web -- we will be making use of The Multiplatform stack Ktor for Networking Kotlin Serialisation for.. serialisation Caching with SQLDelight Koin for Dependency Injection (that one can stay) Plumbing with Coroutine Flows Navigation with Decompose Declarative UI powered with Jetpack/Jetbrains Compose That's the plan! In the next few articles, we'll take a look at each step in more detail. Before jumping on to that -- I want to take a close look at how we can fully modularise a Kotlin Multiplatform project with Going Fully Multiplatform #2 Modularising your Kotlin Multiplatform Project!