-
-
Notifications
You must be signed in to change notification settings - Fork 668
WhereClause.inAnyRange()
David Fahlander edited this page Nov 25, 2016
·
6 revisions
Since v1.3.0
table.where(indexOrPrimKey).inAnyRange(ranges, options)
indexOrPrimKey: String | Name of an index or primary key registered in Version.stores() |
ranges | Array of Arrays defining ranges to search [[lowerBound, upperBound],...] |
options | Options of how to tread range starts and ends |
options.includeLowers | Whether lowerBound should be included or not. Default: true. Specify 'false' explicitly if lowerBound should NOT be included in the results. |
options.includeUppers | Whether upperBound should be included or not. Default: false |
Returns a collection where index is within any of the given ranges.
// Give children and elders a rebate of 50%:
db.customers.where('age').inAnyRange([[0, 18], [65, Infinity]]).modify({Rebate: 1/2});
Dexie.js - minimalistic and bullet proof indexedDB library