PostgreSQL
 sql >> Database >  >> RDS >> PostgreSQL

Come faccio a eliminare o creare un database da clojure.java.jdbc?

Prendi la fonte per do-commands (qui ) e rimuovi la chiamata a transaction :

(defn drop-database [name]
  (sql/with-connection db
    (with-open [s (.createStatement (sql/connection))]
      (.addBatch s (str "drop database " name))
      (seq (.executeBatch s)))))