Skip to content

Instantly share code, notes, and snippets.

@hexx
Created October 2, 2012 18:34
Show Gist options
  • Save hexx/3822141 to your computer and use it in GitHub Desktop.
Save hexx/3822141 to your computer and use it in GitHub Desktop.
gaeds 0.2.0 description sample 1
// Low-Level API
val q = new Query("Person")
val f1 = new FilterPredicate("age", GREATER_THAN_OR_EQUAL, 10)
val f2 = new FilterPredicate("age", LESS_THAN_OR_EQUAL, 20)
q.setFilter(CompositeFilterOperator.and(f1, f2))
DatastoreServiceFactory.getDatastoreService.prepare(q).asIterator
// Gaeds
Person.query.filter(p => (p.age #>= 10) and (p.age #<= 20)).asIterator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment