We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(ns my.stuff (:require [stch.sql.format :as sql] [clojure.java.jdbc :refer [execute!]] [stch.sql.types :refer [call]] [stch.sql.ddl :refer [create timestamp integer primary-key serial table default]])) (def db {:classname "org.postgresql.Driver" :subprotocol "postgresql" :user "stuff" :password "" :subname "//localhost:5432/mydb"}) (defn db-execute! [statement] (execute! db statement)) (db-execute! [(-> (table :schema_versions) (serial :id :not-null) (primary-key :id) (integer :version) (timestamp :created_at (default (call :now))) (create))]) ;=> CompilerException java.lang.IllegalArgumentException: No implementation of method: :to-sql of protocol: #'stch.sql.ddl/ToSQL found for class: stch.sql.types.SqlCall, compiling:(config/migrate_config.clj:1:31)
The text was updated successfully, but these errors were encountered:
I'm happy to accept a PR for this. You will need to add extend the ToSQL protocol (https://github.com/stch-library/sql/blob/master/src/stch/sql/ddl.clj#L29) for the SqlCall type (https://github.com/stch-library/sql/blob/master/src/stch/sql/types.clj#L4).
Sorry, something went wrong.
No branches or pull requests
The text was updated successfully, but these errors were encountered: