-
Notifications
You must be signed in to change notification settings - Fork 203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Paging #550
Merged
Merged
Support Paging #550
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
matt-ramotar
force-pushed
the
matt-ramotar/paging
branch
from
May 26, 2023 22:39
40cf6b1
to
60284fb
Compare
Any progress on this PR? |
@OliverRhyme Hey there - Sorry to be slow. No progress. This is not on our roadmap for Store5 stable. We will keep thinking about this. Completely open to contributions |
matt-ramotar
force-pushed
the
matt-ramotar/paging
branch
from
October 18, 2023 01:11
8ea4d2e
to
7492b1f
Compare
core/src/commonMain/kotlin/org/mobilenativefoundation/store/core5/StoreData.kt
Show resolved
Hide resolved
core/src/commonMain/kotlin/org/mobilenativefoundation/store/core5/KeyProvider.kt
Outdated
Show resolved
Hide resolved
core/src/commonMain/kotlin/org/mobilenativefoundation/store/core5/InsertionStrategy.kt
Show resolved
Hide resolved
cache/src/commonMain/kotlin/org/mobilenativefoundation/store/cache5/StoreMultiCacheAccessor.kt
Outdated
Show resolved
Hide resolved
cache/src/commonMain/kotlin/org/mobilenativefoundation/store/cache5/Identifiable.kt
Outdated
Show resolved
Hide resolved
core/src/commonMain/kotlin/org/mobilenativefoundation/store/core5/StoreKey.kt
Show resolved
Hide resolved
core/src/commonMain/kotlin/org/mobilenativefoundation/store/core5/StoreKey.kt
Show resolved
Hide resolved
Signed-off-by: mramotar_dbx <mramotar@dropbox.com>
Signed-off-by: mramotar_dbx <mramotar@dropbox.com>
Signed-off-by: mramotar_dbx <mramotar@dropbox.com>
Signed-off-by: mramotar_dbx <mramotar@dropbox.com>
Signed-off-by: mramotar_dbx <mramotar@dropbox.com>
Signed-off-by: mramotar_dbx <mramotar@dropbox.com>
matt-ramotar
force-pushed
the
matt-ramotar/paging
branch
from
January 7, 2024 19:42
9aae858
to
a77319c
Compare
Signed-off-by: mramotar <mramotar@dropbox.com>
Signed-off-by: mramotar <mramotar@dropbox.com>
When would this be released? |
Released earlier today! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #250
Technical Design Doc: Native Paging Support in Store5
Context and Scope
Feature request: MobileNativeFoundation/Store#250
This proposal addresses the need for paging support in Store. This enhancement aims to provide a simple, efficient, and flexible way to handle complex operations on large datasets.
Goals and Non-Goals
Goals
Non-Goals
The Actual Design
APIs
StoreKey
An interface that defines keys used by Store for data-fetching operations. Allows Store to load individual items and collections of items. Provides mechanisms for ID-based fetch, page-based fetch, and cursor-based fetch. Includes options for sorting and filtering.
StoreData
An interface that defines items that can be uniquely identified. Every item that implements the
StoreData
interface must have a means of identification. This is useful in scenarios when data can be represented as singles or collections.KeyProvider
An interface to derive keys based on provided data.
StoreMultiCache
depends onKeyProvider
to:Implementations
StoreMultiCache
Thread-safe caching system with collection decomposition. Manages data with utility functions to get, invalidate, and add items to the cache. Depends on
StoreMultiCacheAccessor
for internal data management. Should be used instead ofMultiCache
.StoreMultiCacheAccessor
Thread-safe intermediate data manager for a caching system supporting list decomposition. Tracks keys for rapid data retrieval and modification.
LaunchPagingStore
Main entry point for the paging mechanism. This will launch and manage a
StateFlow
that reflects the current state of the Store.Usage
StoreKey Example
StoreData Example
LaunchPagingStore Example
Degree of Constraint
StoreData
interface, ensuring they can be uniquely identified.StoreKey
interface.Deprecations
Alternatives Considered
Tailored Solution for Paging
Direct integration with Paging3
Paging3 doesn’t have built-in support for:
Custom
StoreKey
andStoreData
StructuresLoose Typing
Annotations and Reflection
Functional Programming Approach
Cross-Cutting Concerns
Future Directions