[Feature Request] Store + SqlDelight + Paging3 Guidance

See original GitHub issue

Specifically, I’m looking for guidance on how to tie Store, Paging3, and SqlDelight together.

In a perfect world, Store wouldn’t need to be part of the equation – I should just be able to use Paging3+SqlDelight. However, that puts me in a weird situation: when I need paging, I use use Some Repository Pattern Type 1, and when I don’t need paging, I use Store/Some Other Repository Pattern. In essence, it seems to me that Paging is an implementation detail, and that Store (or whatever my Repo layer is) should abstract over that.

Suggestion 1 - Paging-specific artifact Store adds a new *-paging3 artifact that pegs a new withPaging(androidx.paging.PagingSource) builder method onto the StoreBuilder. The builder then provides a standard Store object that also happens to implement the RemoteMediator interface. (As an aside, if you squint, RemoteMediator looks pretty similar to the Store signature). Using this Store|RemoteMediator, I can then wire the downstream paging dependencies as necessary – the Repository (i.e. Store) papers over the DB+Network (as Store already does) and handles the request of new info as the viewport changes (as Paging does).

Suggestion 2 - Code Sample Something like the above could be a PITA to maintain, especially since Paging3 is still in alpha…I’d also be happy with guidance on how to tie a non-Room DB to Paging using Store as an intermediary. That could be in the form of a sample, or a wiki…dealer’s choice!

BTW Store is a super cool library, thanks for all the time and effort y’all spent on it 😄

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:20
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
digitalbuddhacommented, Mar 14, 2022

Hi folks hold tight, there will be some messaging from dropbox coming along with how to join the google summer of code projects

1reaction
changusmccommented, Mar 30, 2022

Hi @digitalbuddha , Im interested to work on this issue as a part of GSoC2022. Kindly guide me through the next steps

Hi folks hold tight, there will be some messaging from dropbox coming along with how to join the google summer of code projects

Ok thanks.

Hello @digitalbuddha, I’m very interested in working on this project as a part of GSoC 2022. Further guidance for the onboarding process would be much appriciated.

Due to some personnel transitions, we unfortunately had to pull Store from GSOC2022. We sincerely apologize for the inconvenience

Read more comments on GitHub >

github_iconTop Results From Across the Web

Advice on pagination · Issue #1409 · cashapp/sqldelight
Hi, I want to ask you guys about local + remote pagination in combination with Rx. The actual issue is how and where...
Read more >
Android Paging - SQLDelight - Cash App Code Blog
SQLDelight offers two methods for paging data -- offset based paging and keyset paging. Offset Based Paging. Offset paging achieves paged results using ......
Read more >
Getting Started With SQLDelight in Android Development
Write the SQL Code​​ We need to create a separate directory with the name sqldelight under the main directory, similar to java and...
Read more >
Door: Room for Kotlin Multiplatform : r/androiddev
I have been working on making Room work for Kotlin multiplatform. The objectives are similar to SQLDelight. Door is a Kotlin Symbol Processor ......
Read more >
Paging 2 library overview
The Paging Library helps you load and display small chunks of data at a time. Loading partial data on demand reduces usage of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found