LiveQuery usage with multiple primary conditions #2007
Replies: 2 comments 2 replies
-
The liveQuery should only trigger when one of the creators is Jackson (but the filter of genre cannot be observed as it's a manual filter on top of the index based filter of creators). What happens if you:
None of these operations should trigger the query. If it does, it's a bug. However, a Jackson entry of type: 'SOUL' would still trigger the query (not bug). |
Beta Was this translation helpful? Give feedback.
-
The same principle applies for how to pick the part of the filter that can be accomplished using index when querying, is also used for detecting updates. That means, to pick the criteria that is most narrowing in the where-clause and complement it with filter and the false positive updates shouldnt e an issue. Multiple criterias can sometimes fit into a single compound index but in this case it can't because I've of the criterias is a multientry index and indexeddb does not support combining compound and multientry indexes. Can you confirm if this seems to be a bug or not from my last response (1, 2 and 3)? |
Beta Was this translation helpful? Give feedback.
-
I have a dexie db instance with the below schema
An example of such data can be taken as:
The type property can be any of the following types : [ROCK, JAZZ, POP, COUNTRY, FOLK].
I want to write a liveQuery such that it is only triggered when the creator is
Jackson
and the type is either ROCK, JAZZ and POP.The current query i am using is:
But this doesn't seem to work and the querier function seems to run on all updates to the db.
Beta Was this translation helpful? Give feedback.
All reactions