Created
April 27, 2013 05:49
-
-
Save yuanmai/5472034 to your computer and use it in GitHub Desktop.
Record print-method in Clojure
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
(defmethod print-method RTable [tble ^String out] | |
"RTables print as SQL92 compliant SQL" | |
(when *debug* | |
(doseq [[k v] tble] | |
(.write out (format "%s\t\t\t\t%s\n" (str k) (str v))))) | |
(.write out (-> tble (compile nil) interpolate-sql))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment