You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been using mutate method on DBCore successfully so far to maniupulate what I save to the database and I was wondering how I can achieve a similar thing with read requests. I've found a comment on a issue in this repo and that seems to be exactly what I want but it was 4 years ago and I wonder if there is a newer recommendation on this.
My use case is that I have a table with [name+project] as primary key. The project is updated inside the application rarely so I was thinking about manipulating the read request to add the project to the query. So that rest of the application can only query using name. For useLiveQuery, I was thinking about utilizing Dexie.on("storagemutated").fire(changeParts: ObservabilitySet); to trigger a state update.
Is this frowned upon? If so, what would be a better design?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have been using
mutate
method on DBCore successfully so far to maniupulate what I save to the database and I was wondering how I can achieve a similar thing with read requests. I've found a comment on a issue in this repo and that seems to be exactly what I want but it was 4 years ago and I wonder if there is a newer recommendation on this.My use case is that I have a table with
[name+project]
as primary key. The project is updated inside the application rarely so I was thinking about manipulating the read request to add the project to the query. So that rest of the application can only query usingname
. ForuseLiveQuery
, I was thinking about utilizingDexie.on("storagemutated").fire(changeParts: ObservabilitySet);
to trigger a state update.Is this frowned upon? If so, what would be a better design?
Beta Was this translation helpful? Give feedback.
All reactions