WhereClause.noneOf()
Syntax
Parameters
indexOrPrimKey: String
Name of an index or primary key registered in Version.stores()
key
Array of keys to compare with. Each key MUST be a Number, String, Date or Array instance. Booleans are not accepted as valid keys
Return Value
Collection
Remarks
Queries the collection for all valid values that does not match given value. Note that you will only find values that are valid indexedDB keys.
Given the following data:
And the following query:
We get the following result:
Note that id 4, 5 and 7 wasn't included in the result. This is because indexedDB uses sparse indexes and will not index records where a key is invalid. A valid key is a key of type string, number, Date or Array<string | number | Date>.
Practical Limitations
As exemplified above, WhereClause.noneOf() and WhereClause.notEqual() will NOT find records with invalid keys, such as null, booleans, undefined etc. It can only search keys that indexedDB supports: string, number, Date or Array<string | number | Date>.