-
Notifications
You must be signed in to change notification settings - Fork 303
IndexedDB: Add (de)serialization functionality for EventCacheStore
backend
#5226
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
IndexedDB: Add (de)serialization functionality for EventCacheStore
backend
#5226
Conversation
EventCacheStore
backendEventCacheStore
backend
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, what great patches! Thanks for them. I've left a handful of questions. Apart from that, I'm happy to approve it and merge it!
crates/matrix-sdk-indexeddb/src/event_cache_store/serializer/traits.rs
Outdated
Show resolved
Hide resolved
crates/matrix-sdk-indexeddb/src/event_cache_store/migrations.rs
Outdated
Show resolved
Hide resolved
crates/matrix-sdk-indexeddb/src/event_cache_store/serializer/types.rs
Outdated
Show resolved
Hide resolved
crates/matrix-sdk-indexeddb/src/event_cache_store/serializer/types.rs
Outdated
Show resolved
Hide resolved
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## main #5226 +/- ##
==========================================
- Coverage 90.18% 90.16% -0.02%
==========================================
Files 334 334
Lines 104681 104681
Branches 104681 104681
==========================================
- Hits 94402 94390 -12
- Misses 6226 6238 +12
Partials 4053 4053 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent, thanks for the fixup patches! You can rebase your issue, and I'll merge it as soon as the CI is fixed (not your problem, the maintainers are fixing it).
3bd8b6e
to
728140f
Compare
Can you rebase on top of |
…s and indexed types in event cache store Signed-off-by: Michael Goldenberg <[email protected]>
… event cache store Signed-off-by: Michael Goldenberg <[email protected]>
…d types in event cache store Signed-off-by: Michael Goldenberg <[email protected]>
…che store database
Signed-off-by: Michael Goldenberg <[email protected]>
Signed-off-by: Michael Goldenberg <[email protected]>
Signed-off-by: Michael Goldenberg <[email protected]>
Signed-off-by: Michael Goldenberg <[email protected]>
…ndexed` types Signed-off-by: Michael Goldenberg <[email protected]>
Signed-off-by: Michael Goldenberg <[email protected]>
728140f
to
7d8c185
Compare
Background
This pull request is part of a series of pull requests to add an IndexedDB implementation of the
EventCacheStore
(see #4617, #4996, #5090, #5138). This particular pull request provides (de)serialization functionality for the types defined in #5138.Changes
This change add a few traits to aid in (de)serialization and implements those traits on a relevant types. Furthermore, there is a
struct
for conveniently calling into those (de)serialization traits - i.e.,IndexeddbEventCacheStoreSerializer
.trait
s andimpl
sIndexed
- converts high-level types to/from indexed typesimpl
s:Chunk
↔IndexedChunk
Event
↔IndexedEvent
Gap
↔IndexedGap
IndexedKey
- encodes a key for an indexed typeimpl
s:Chunk
IndexedChunkIdKey
IndexedNextChunkIdKey
Event
IndexedEventIdKey
IndexedEventPositionKey
IndexedEventRelationKey
Gap
IndexedGapIdKey
IndexedKeyBounds
- encodes the lower and upper keys for an indexed typeimpl
s:Chunk
IndexedChunkIdKey
IndexedNextChunkIdKey
Event
IndexedEventIdKey
IndexedEventPositionKey
IndexedEventRelationKey
Gap
IndexedGapIdKey
Future Work
EventCacheStore
which uses query functions mentioned aboveSigned-off-by: Michael Goldenberg [email protected]