-
-
Save canweriotnow/2a2e87c24e495cf340f5 to your computer and use it in GitHub Desktop.
JDBC Clojure output
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
(defn bbts-dev [] | |
{ :classname (get-property "acedia.bbts") | |
:subprotocol (get-property "acedia.bbts.subprotocol") | |
:subname (str "@" (get-property "acedia.bbts.dev.host") ":" (get-property "acedia.bbts.dev.port") ":" (get-property "acedia.bbts.dev.sid")) | |
:user (get-property "acedia.bbts.dev.user") | |
:password (get-property "acedia.bbts.dev.password")}) | |
user => (bbts-prod) | |
{:classname "oracle.jdbc.driver.OracleDriver", :subprotocol "oracle", :subname "@hostname:1521:bbts", :user "user", :password "pass"} | |
user=> (with-connection bbts-dev (with-query-results rs ["select * from customer where rownum < 10"] (dorun (map #(println (:firstname %)) rs)))) | |
java.lang.IllegalArgumentException: db-spec acedia.config$bbts_dev@2123baa0 is missing a required parameter (NO_SOURCE_FILE:0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment