Created
August 18, 2010 17:49
-
-
Save wilig/535574 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
sequel> (to-sql (filter (> :table1/id 5) (collect :table1))) | |
["select * from table1 WHERE table1.id > ?" 5] | |
sequel> (to-sql (filter (and (> :table1/id 5) (< :table1/id 15)) (collect :table1))) | |
["select * from table1 WHERE (table1.id > ? AND table1.id < ?)" 5 15] | |
sequel> (to-sql (filter (or (and (> :table1/id 5) (< :table1/id 15)) (= :table1/id 50)) (collect :table1))) | |
["select * from table1 WHERE ((table1.id > ? AND table1.id < ?) OR table1.id = ?)" 5 15 50] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment