-
Notifications
You must be signed in to change notification settings - Fork 332
IndexedDB: Add initial types and database migrations for EventCacheStoreMedia
backend
#5603
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 initial types and database migrations for EventCacheStoreMedia
backend
#5603
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5603 +/- ##
==========================================
- Coverage 88.88% 88.88% -0.01%
==========================================
Files 347 347
Lines 96275 96275
Branches 96275 96275
==========================================
- Hits 85572 85571 -1
- Misses 6674 6675 +1
Partials 4029 4029 ☔ View full report in Codecov by Sentry. |
CodSpeed Performance ReportMerging #5603 will not alter performanceComparing Summary
|
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.
Well, I've nothing to add! Thanks and well done!
…entionPolicy Signed-off-by: Michael Goldenberg <[email protected]>
…metadata Signed-off-by: Michael Goldenberg <[email protected]>
…vent cache Signed-off-by: Michael Goldenberg <[email protected]>
…index Signed-off-by: Michael Goldenberg <[email protected]>
Signed-off-by: Michael Goldenberg <[email protected]>
…ndex Signed-off-by: Michael Goldenberg <[email protected]>
…adata index Signed-off-by: Michael Goldenberg <[email protected]>
af923ca
to
f29be69
Compare
Background
This pull request is part of a series of pull requests to add a full IndexedDB implementation of the
EventCacheStore
(see #4617, #4996, #5090, #5138, #5226, #5274, #5343, #5384, #5406, #5414, #5497, #5506, #5540, #5574). This particular pull request adds types and migrations that will support storing media in IndexedDB viaEventCacheStoreMedia
.Changes
Queries
Based on the SQLite-backed implementation of
EventCacheStoreMedia
, the following queries for interacting with stored media should be supported.MediaRequestParameters
MediaSource
MediaRetentionPolicy
.MediaRetentionPolicy
.MediaRetentionPolicy
.Types
Two types have been added -
Media
andMediaMetadata
to represent each media object in the database.The fields in
MediaMetadata
along with the size ofMedia::content
after it is serialized, are used to derive keys for indexingMedia
in service of the queries above.Schema
In order to support the queries above, the following object stores and indices have been created.
MEDIA
- Object Storeid
- derived fromMediaRequestParameters::unique_key()
Media
MEDIA_SOURCE
- Index onMEDIA
source
- derived fromMediaSource::unique_key()
MEDIA_LAST_ACCESS
- Index onMEDIA
last_access
- derived fromMedia.ignore_policy
andMedia.last_access
MEDIA_CONTENT_SIZE
- Index onMEDIA
content_size
- derived fromMedia.ignore_policy
andMedia.content
MEDIA_RETENTION_METADATA
- Index onMEDIA
retention_metadata
- derived fromMedia.ignore_policy
,Media.last_access
, andMedia.content
Future Work
EventCacheStoreMedia
Signed-off-by: Michael Goldenberg [email protected]