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
{{ message }}
Repository navigation
There is no documentation about the usage of QueryBuilder. #2
QueryBuilder is intended to create an IDBKeyRange object. Simply call e.g.
var keyrange = queryBuilder.$gt(20).compile;
and use it in e.g. indexedDB.each(keyrange)
Can I use more than one index to construct a query?
var myQuery = $indexedDB.queryBuilder.$index('age_idx').$gt(40).$asc.$index('name_idx').$eq("test").compile;
No, you can only use one index per query, this is a limitation of indexedDB. As a workaround you can use your first index to limit a query, then open a cursor and test for secondary values to narrow your resultset.
Activity
webcss commentedon May 30, 2013
QueryBuilder is intended to create an IDBKeyRange object. Simply call e.g.
var keyrange = queryBuilder.$gt(20).compile;
and use it in e.g. indexedDB.each(keyrange)
marlonpp commentedon Feb 19, 2014
Can I use more than one index to construct a query?
var myQuery = $indexedDB.queryBuilder.$index('age_idx').$gt(40).$asc.$index('name_idx').$eq("test").compile;
Something like that.
webcss commentedon Mar 4, 2014
No, you can only use one index per query, this is a limitation of indexedDB. As a workaround you can use your first index to limit a query, then open a cursor and test for secondary values to narrow your resultset.