Skip to content

Commit 24c4b90

Browse files
committed
docs: Update SQLDelight Paging3 fork documentation and metadata
- Update `libs.versions.toml` and `README.md` to clarify that the vendored `sqldelight:paging3` fork is maintained specifically for async-driver support (`generateAsync = true`). - Reflect that upstream SQLDelight now uses `androidx.paging`, making the previous reason for the fork (dependency mismatch) obsolete. - Clarify that the fork will be maintained until upstream supports async query execution in its paging source.
1 parent fef25d4 commit 24c4b90

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ sqlDelight-android = { module = "app.cash.sqldelight:android-driver", version.re
6666
sqlDelight-native = { module = "app.cash.sqldelight:native-driver", version.ref = "sqlDelight" }
6767
sqlDelight-jvm = { module = "app.cash.sqldelight:sqlite-driver", version.ref = "sqlDelight" }
6868
sqlDelight-web = { module = "app.cash.sqldelight:web-worker-driver", version.ref = "sqlDelight" }
69-
#sqlDelight-paging = { module = "app.cash.sqldelight:androidx-paging3-extensions", version.ref = "sqlDelight" } #TODO use instead of ":thirdparty:app:cash:sqldelight:paging3" when the lib will dependent of "androidx.paging" instead of "app.cash.paging"
69+
#sqlDelight-paging = { module = "app.cash.sqldelight:androidx-paging3-extensions", version.ref = "sqlDelight" } #TODO use instead of ":thirdparty:app:cash:sqldelight:paging3" when the upstream paging module supports async query execution for generateAsync=true
7070
sqlDelight-coroutinesExt = { module = "app.cash.sqldelight:coroutines-extensions", version.ref = "sqlDelight" }
7171
sqlDelight-asyncExt = { module = "app.cash.sqldelight:async-extensions", version.ref = "sqlDelight" }
7272

thirdparty/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ thirdparty/ (Vendored Third-Party Libraries)
3131

3232
**Purpose**: SQLDelight integration with Paging3 library
3333

34-
**Why vendored**: Official SQLDelight Paging3 extension was discontinued. This fork maintains the functionality for the project.
34+
**Why vendored**: Official SQLDelight Paging3 is still published and now uses `androidx.paging`, but this project enables SQLDelight `generateAsync = true`. The vendored fork preserves the upstream API while adding async-driver support.
3535

3636
**Original source**: [Cash App SQLDelight Paging3 Extension](https://github.com/cashapp/sqldelight/tree/master/extensions/androidx-paging3)
3737

3838
**Modifications**:
3939
- Updated for latest SQLDelight version
40-
- Fixed multiplatform compatibility issues
40+
- Added async-driver support for `generateAsync = true`
4141
- Maintained Paging3 integration
4242

4343
**Platforms**:

thirdparty/app/cash/sqldelight/paging3/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
Like "app.cash.sqldelight:androidx-paging3-extensions", but using "androidx.paging" instead of "app.cash.paging".
1+
Like "app.cash.sqldelight:androidx-paging3-extensions", but with async-driver support for projects that enable SQLDelight `generateAsync = true`.
22

3-
This local fork adapts the SQLDelight paging integration to use androidx.paging and also includes support for SQLDelight's async driver. When your database is generated with `generateAsync = true`, this module will use the `app.cash.sqldelight:async-extensions` suspend helpers (e.g. `awaitAsList`, `awaitAsOne`) when a `SuspendingTransacter` is used, avoiding IllegalStateException from mixing sync calls with an async driver.
3+
SQLDelight `2.3.2` already publishes `androidx-paging3-extensions` against `androidx.paging`, but the upstream implementation still calls synchronous `executeAsList`/`executeAsOne`. This local fork keeps the same API surface and adds support for SQLDelight's async driver. When your database is generated with `generateAsync = true`, this module will use the `app.cash.sqldelight:async-extensions` suspend helpers (e.g. `awaitAsList`, `awaitAsOne`) when a `SuspendingTransacter` is used, avoiding IllegalStateException from mixing sync calls with an async driver.
44

55
Features
6-
- Integrates SQLDelight Query-based paging with `androidx.paging`.
6+
- Matches the published SQLDelight paging API that already integrates with `androidx.paging`.
77
- Uses async-extensions (suspending query helpers) automatically when a `SuspendingTransacter` is provided.
88
- Falls back to synchronous calls for a regular `Transacter` for backward compatibility.
99

@@ -27,6 +27,6 @@ val pagingSource: PagingSource<Int, YourRowType> = QueryPagingSource(
2727

2828
Notes
2929
- If you configure SQLDelight with `generateAsync = true`, make sure you include and initialize the async driver and `async-extensions` dependency on the target platforms that require it. This module automatically uses suspend helpers when appropriate, but mixing synchronous execute* calls with an async driver will still throw the usual SQLDelight IllegalStateException.
30-
- This module is intended as a simple local replacement of the upstream paging integration; feel free to adapt it for your project's packaging or publish it if useful.
30+
- This module is intended as a simple local replacement of the upstream paging integration until upstream also supports async query execution in the paging source.
3131

3232
License: same as original upstream (Apache 2.0).

0 commit comments

Comments
 (0)