Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There is no documentation about the usage of QueryBuilder. #2

Open
thvd opened this issue May 30, 2013 · 3 comments
Open

There is no documentation about the usage of QueryBuilder. #2

thvd opened this issue May 30, 2013 · 3 comments

Comments

@thvd
Copy link
Contributor

thvd commented May 30, 2013

No description provided.

@webcss
Copy link
Owner

webcss commented 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)

@webcss webcss closed this as completed Jun 24, 2013
@marlonpp
Copy link

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
Copy link
Owner

webcss commented 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.

@webcss webcss reopened this Mar 4, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants