This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-11-10
Channels
- # asami (41)
- # babashka (24)
- # beginners (48)
- # calva (41)
- # cider (10)
- # clj-commons (20)
- # clj-kondo (2)
- # cljdoc (8)
- # clojure (131)
- # clojure-australia (4)
- # clojure-europe (17)
- # clojure-hungary (2)
- # clojure-india (2)
- # clojure-nl (3)
- # clojure-uk (1)
- # clojurescript (12)
- # community-development (6)
- # core-logic (4)
- # cursive (11)
- # datomic (22)
- # emacs (25)
- # events (1)
- # exercism (2)
- # fulcro (30)
- # helix (5)
- # honeysql (6)
- # hugsql (3)
- # integrant (12)
- # introduce-yourself (4)
- # lsp (5)
- # malli (5)
- # nextjournal (31)
- # off-topic (4)
- # pedestal (3)
- # portal (51)
- # reitit (33)
- # remote-jobs (1)
- # shadow-cljs (12)
- # sql (10)
- # vim (7)
- # xtdb (37)
Has anyone experienced postgres trying to use your local users name even when you provide the proper username for a database in the map?
(def db-spec {:dbtype "postgresql"
:dbname "monarch"
:username "vega"
:password "spiderdeus"})
(def datasource (jdbc/get-datasource db-spec))
It's :user
, not :username
.
Ha, ok that makes sense. Ironically I was in between setting hikaricp up then I decided "no, let me do this manually". Gotcha....
It's a pain that HikariCP alone requires :username
😞
Well...simple enough. I'll be using it later tonight...but now I know there's a difference.
I'm vaguely tempted to treat :username
as an alias for :user
for the non-HikariCP case at some point.
I'm not sure I'm phrasing this correctly, but how would I wrap next.jdbc/plan
with an xform, returning a lazy sequence of transformed records? something like:
(defn processed-records
[jdbc-url]
( ... something wrapped around this to create a lazy-seq:
(jdbc/plan (jdbc/get-datasource jdbc-url)
["select name, age from some_table"]
...))
... such that the function "pre-processes" each record in the (lazy) sequence? I can require that users of processed-records
do the processing as part of an xform in into
or reduce
, but I'd like to be able to run something like:
(into [] (processed-records jdbc-url))
and get the records dumped into a vector -- maybe part of the pre-processing is to convert each row into a string formatted as "[name=larry age=33]"
without having to apply a transform outside processed-records
. does that make sense?