Thanks @seancorfield, looks good 👍
I have another one for you. Although I’m not sure if it belongs here or in #pedestal
This bit of code runs fine on its own:
(map #(do (println "-----") %)
(sql/find-by-keys ds
:activities
{:user_id 1}
{:builder-fn as-unqualified-kebab-maps}))
But when I run it in a pedestal interceptor, the println
string is prepended to the outputI can replicate the behaviour outside of pedestal. If I bind the result and then pr-str
it twice, the first one has all the println
mapped values at the start of the list it prints. The second one doesn’t.
I’m guessing pedestal is calling pr-str
or similar on it when it attaches it to the response as an EDN body
okay ignore me - this isn’t anything to do with next.jdbc
!
user=> (pr-str (map #(do (println "xyz") %) (range 0 4)))
"(xyz\nxyz\nxyz\nxyz\n0 1 2 3)"
and I see it is well documented here: https://clojuredocs.org/clojure.core/pr-str
that teaches me for not reading the docs
Sean, it currently to set date/time values setTimestampt used. would this work st.setObject(1, localDate)?
https://jdbc.postgresql.org/documentation/head/java8-date-time.html
i think it makes sense to delegate handling of this to db driver, rather the doing it manually? what do you think?
happy to prepare the PR
If you do not load next.jdbc.date-time
then the default behavior is already setObject( idx, obj )
The point of next.jdbc.date-time
is to allow you to override the default setObject
behavior when it doesn't do the right thing @kirill.salykin