This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-03-30
Channels
- # announcements (1)
- # beginners (113)
- # cljs-dev (5)
- # cljsrn (20)
- # clojure (16)
- # clojure-losangeles (1)
- # clojure-nl (1)
- # clojure-spec (17)
- # clojure-uk (5)
- # clojurescript (125)
- # core-async (4)
- # cursive (4)
- # datomic (66)
- # defnpodcast (1)
- # fulcro (25)
- # kaocha (2)
- # klipse (1)
- # nrepl (19)
- # re-frame (5)
- # reagent (3)
- # reitit (6)
- # ring-swagger (16)
- # shadow-cljs (16)
- # sql (6)
- # test-check (1)
- # tools-deps (1)
- # vim (7)
I'm trying to move from using [alaisi/postgres.async "0.8.0"] to [org.clojure/java.jdbc "0.7.9"] [org.postgresql/postgresql "42.2.5.jre7"]
But I'm stuck doing a query.
(def pg-db {:dbtype "postgresql"
:dbname "balancedb"
:host "localhost"
:user "clojure_ch"
:password "lacinia"
:port 5432
:ssl false})
(defn find-cac-by-uuid
[uuid]
(log/debug "try to find cac" uuid)
(j/with-db-connection [db-con pg-db]
(j/query db-con ["SELECT * FROM cac WHERE uuid = ?" uuid])))
where the uuid is a string, the query
SELECT * FROM cac WHERE uuid = 'cf869196-1edb-4e00-9d43-81c54e88118c';
in pgadmin executes fine