heynemann (owner)

Revisions

gist: 112040 Download_button fork
public
Public Clone URL: git://gist.github.com/112040.git
Embed All Files: show embed
Python #
1
2
3
4
5
6
7
8
9
10
11
From(collection)
          .where("item.some_boolean or (item.other_boolean and item.another_boolean)")
          .order_by("item.some_order_property")
          .select("name","age","sex","salary")
 
# This query returns a new collection transformed from the original.
# The items in this new collection are from a class called
# Dynamic_Item and feature only the four selected properties,
# instead of all the properties of the original items in 'collection'.
# The where clause is observed as well, since only the items that
# the given clause evaluates to true are returned.