Created
August 18, 2010 17:57
-
-
Save wilig/535633 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> (->> (collect :table1 :table2 [:table1/id :table2/name]) | |
(filter (and (> :table1/id 5) (< :table1/id 15))) | |
(limit 100) | |
(offset 50) | |
(order-by (asc :table2/name)) | |
(to-sql)) | |
["select table1.id, table2.name from table1, table2 WHERE (table1.id > ? AND table1.id < ?) LIMIT 100 OFFSET 50 ORDER BY table2.name ASC" 5 15] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment