Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
(defprotocol StorageDifferences
(-munge-uuid-for-storage [driver value])
(-munge-hash-for-storage [driver value])
(-munge-json-for-storage [driver value]))
(extend-protocol StorageDifferences
com.impossibl.postgres.jdbc.PGDataSource
(-munge-uuid-for-storage [driver value]
(str->pgobject "uuid" value))
(-munge-hash-for-storage [driver value]
(str->pgobject "bytea" value))
(-munge-json-for-storage [driver value]
(str->pgobject "json" value)))
(def identity' (fn [_ x] x))
(extend org.hsqldb.jdbc.JDBCDataSource
StorageDifferences
{:-munge-uuid-for-storage identity'
:-munge-hash-for-storage identity'
:-munge-json-for-storage identity'})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.