Skip to content

Instantly share code, notes, and snippets.

@yuanmai
Created April 27, 2013 05:49
Show Gist options
  • Save yuanmai/5472034 to your computer and use it in GitHub Desktop.
Save yuanmai/5472034 to your computer and use it in GitHub Desktop.
Record print-method in Clojure
(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