- From: Joshua Bell <notifications@github.com>
- Date: Tue, 21 Jun 2016 13:29:09 -0700
- To: w3c/IndexedDB <IndexedDB@noreply.github.com>
- Cc:
Received on Tuesday, 21 June 2016 20:30:07 UTC
Here's another variation:
http://stackoverflow.com/questions/37807022/how-to-do-select-from-table-where-indexa-a-order-by-indexb-asc-limit-10
In this case the user wants `SELECT ... WHERE indexA >= 'a' ORDER BY indexB ASC LIMIT 10`
This can be done with an N-dimensional select (with the syntax proposed above) by:
```js
let index = store.createIndex('by_b_a', ['indexB', 'indexA']);
index.getAll([null, IDBKeyRange.lowerBound('a')], 10);
```
... but that's still basically a "full table scan". Any DB experts know what primitives should exist to satisfy this?
---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/IndexedDB/issues/40#issuecomment-227561707
Received on Tuesday, 21 June 2016 20:30:07 UTC