This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-05-16
Channels
- # architecture (12)
- # aws (8)
- # bangalore-clj (1)
- # beginners (172)
- # boot (25)
- # chestnut (3)
- # cider (15)
- # cljsrn (5)
- # clojure (170)
- # clojure-india (1)
- # clojure-italy (21)
- # clojure-nl (87)
- # clojure-romania (3)
- # clojure-sg (1)
- # clojure-spec (1)
- # clojure-uk (79)
- # clojurescript (79)
- # cursive (2)
- # datomic (29)
- # dirac (26)
- # emacs (7)
- # fulcro (13)
- # jobs (4)
- # juxt (22)
- # lein-figwheel (1)
- # leiningen (2)
- # lumo (39)
- # nrepl (1)
- # off-topic (54)
- # onyx (124)
- # pedestal (1)
- # planck (4)
- # portkey (1)
- # re-frame (36)
- # reagent (2)
- # ring-swagger (8)
- # shadow-cljs (107)
- # spacemacs (1)
- # specter (25)
- # sql (7)
- # tools-deps (5)
- # vim (10)
- # yada (25)
how do I parameterize the time string in this: (jdbc/query db ["select TIME '9:00:00'"])
I've tried (jdbc/query db ["select TIME ?" "'9:00:00'"])
, (jdbc/query db ["select TIME ?" "9:00:00"])
and (jdbc/query db ["select TIME '?'" "9:00:00"])
but none of them works
I've never seen that syntax but I wouldn't expect you to be able to parameterize that part of a select
.
actually it's part of an overlaps
. I used select
here to simplify my question
I guess it'll be cast type's job there
@myguidingstar with Postgres, I think you can also wrap the parameterised value with a org.postgresql.util.PGObject
,
(doto (PGobject.)
(.setType "time")
(.setValue "9:00:00"))
(This works with jsonb, don't see why it wouldn't with times)