2 ms·
> Let's say you need to search for age > 19 and less than 30 for a person with the name of Jane or John. I’m pretty sure you can do that. You can create an ID
by comex 5y ago
> Let's say you need to search for age > 19 and less than 30 for a person with the name of Jane or John.
I’m pretty sure you can do that. You can create an IDBIndex that covers multiple fields, then narrow down the search using key ranges. Though, even with key ranges, narrowing down results based on multiple independent ranges requires some manual work:
https://gist.github.com/inexorabletash/704e9688f99ac12dd336 https://gist.github.com/inexorabletash/704e9688f99ac12dd336
But at least algorithmically speaking, that’s roughly the same thing that a database natively supporting such queries would be doing, so the big-O performance should be the same. Though I wouldn’t be surprised at all if it’s slower in practice.