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

Support advanced queries #3

Open
Download opened this issue Oct 18, 2015 · 0 comments
Open

Support advanced queries #3

Download opened this issue Oct 18, 2015 · 0 comments

Comments

@Download
Copy link
Owner

WebDB currently supports very basic queries at the table level:

db.mytable.get(criteria);

In this example, criteria may be:

  • undefined, in which case all records are returned
  • An ID, in which case either an empty array or an array with one record is returned
  • A criteria object, that contains one or more criteria

The third option is most advanced, and allows us to do things like:

// Get all adults named 'Jack'
var adultsNamedJack = db.people.get({name:'Jack', age:{$gte: 18}});

What we want however, is a more advanced query mechanism that allows us to query across multiple tables and add or clauses etc. This mechanism should also allow for predefining queries and then running them by only filling in the query parameters.

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

1 participant