I hereby claim:
- I am trinityXmontoya on github.
- I am trinity (https://keybase.io/trinity) on keybase.
- I have a public key whose fingerprint is 10A6 4417 E7BE 13F2 2BAA DDBA 54D2 7587 3556 71DC
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
(require '[cheshire.core :as json] | |
'[clojure.string :as string] | |
'[yesql.core :as yesql]) | |
(defmulti ->sql "converts a given val to Postgres-compatible SQL" class) | |
(defmethod to->sql :default ([f] f)) | |
(defmethod to->sql String (str "'" f "'")) | |
(defmethod to->sql org.joda.time.DateTime ([f] ((str "CAST('" f "' AS TIMESTAMP)"))) | |
(defmethod to->sql clojure.lang.PersistentVector ([f] (str "ARRAY[" (string/join ", " f) "]"))) |