/gist:a8b10140d489bac627e6 Secret
Created
December 19, 2012 21:47
-
-
Save joevandyk/a8b10140d489bac627e6 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
(def db (partial sql/with-connection "postgres://localhost/tanga_dev" )) | |
(db | |
(:username | |
(first | |
(sql/with-query-results results ["select * from users"] (into [] results))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
(defmacro db [& body]
`(sql/with-connection "postgres://localhost/tanga_dev"
~@Body))