Skip to content

Commit

Permalink
DOCS(readme): add example for filtering by key in datastore.
Browse files Browse the repository at this point in the history
  • Loading branch information
silvolu committed Jul 31, 2014
1 parent b0f469c commit f2b26dc
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,14 @@ var q = ds.createQuery('Company')
.filter('size <', 400);
~~~~

To filter by key, use `__key__` for the property name. Filtering on keys
stored as properties is not currently supported.

~~~~ js
var q = ds.createQuery('Company')
.filter('__key__ =', ['Company', 'Google'])
~~~~

In order to filter by ancestors, use `hasAncestor` helper.

~~~ js
Expand Down

0 comments on commit f2b26dc

Please sign in to comment.