Suppose we got a database for todolist and want to query all the important elements and have not yet completed. In SQL, I will use something like
SELECT * FROM todolist WHERE important = true AND state <> 'done'
How can we execute this type of query in the indexeddb nosql database? With indexes? Another way? Not possible?
As I know, to filter the result by important = true :
objectstore.index('important').openCursor(IDBKeyRange.only('true'))
But I donβt know how to filter on state <> 'done' , since we only got IDBKeyRange.only(z) .
And I do not know how to filter both sentences.
NB: In MongoDB we do:
db.userdetails.find({"date_of_join" : "16/10/2010","education":"MCA"})
source share