Last active
December 13, 2015 19:38
-
-
Save noprompt/4963866 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
(defmacro SQL* [& clauses] | |
(let [query (walk/postwalk | |
(fn [x] | |
(if (and (symbol? x) (re-find #"^[A-Z]+$" (name x))) | |
(if (resolve x) | |
x | |
(str x)) | |
x)) clauses) | |
query (cons 'list query)] | |
`(join \space ~query))) |
Author
noprompt
commented
Feb 15, 2013
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment