-
-
Save senior/47a1c754b1ee9b31b99b 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
(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