Created
May 15, 2009 03:08
-
-
Save heynemann/112040 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment