Created
December 11, 2012 22:23
-
-
Save cjauvin/4262882 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
where = {} | |
where['adjective'] = 'Lucid' | |
# where adjective = 'Lucid' | |
where['adjective'] = ('Warty', 'Dapper') | |
# where adjective in ('Warty', 'Dapper') | |
# For sequence values, the rules are: a tuple translates | |
# to the 'in' operator (as above), a list to a PG array | |
# and a set to a conjunction of predicates (see below) | |
where[('version::real', '<=')] = 10.04 | |
# where version::real <= 10.04 | |
where[('adjective', 'ilike')] = {'%lucid%', '%lynx%'} | |
# where adjective ilike '%lucid%' and adjective ilike '%lynx%' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment