angular-indexedDB icon indicating copy to clipboard operation
angular-indexedDB copied to clipboard

There is no documentation about the usage of QueryBuilder.

Open thvd opened this issue 12 years ago • 3 comments

thvd avatar May 30 '13 16:05 thvd

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)

webcss avatar May 30 '13 18:05 webcss

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.

marlonpp avatar Feb 19 '14 17:02 marlonpp

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.

webcss avatar Mar 04 '14 07:03 webcss