This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-11-06
Channels
- # bangalore-clj (16)
- # beginners (120)
- # boot (21)
- # cider (24)
- # clara (9)
- # cljs-experience (1)
- # cljsrn (1)
- # clojure (218)
- # clojure-dev (3)
- # clojure-italy (12)
- # clojure-losangeles (4)
- # clojure-norway (2)
- # clojure-russia (2)
- # clojure-spec (19)
- # clojure-uk (178)
- # clojurescript (52)
- # cursive (7)
- # data-science (55)
- # datomic (25)
- # defnpodcast (11)
- # emacs (5)
- # fulcro (27)
- # hoplon (2)
- # leiningen (14)
- # midje (9)
- # off-topic (132)
- # onyx (19)
- # other-languages (23)
- # portkey (2)
- # re-frame (31)
- # reagent (1)
- # ring-swagger (15)
- # shadow-cljs (58)
- # slack-help (13)
- # spacemacs (22)
- # sql (7)
- # test-check (13)
unlikely
is possible for this to work?
(defn update-campaigns-status [db-spec campaigns]
(jdbc/update! db-spec
:tb_campanha_usuario
{:dataAgendamento (db/now)}
[“idCampanha in ?” campaigns]))
@plins insert!
and update!
work with Clojure data structures. If you want to use SQL functions, you'll need to use execute!
.
@plins for your question regarding in
, you need to provide enough ?
to match your vector: (into [(str "idCampanha in ( " (str/join "," (repeat (count campaigns))) " )"] campaigns)
is what you are looking for.
so you would construct ["idCampanha in ( ?, ?, ?, ? )" campaign1 campaign2 campaign3 campaign4]
(if campaigns
had four elements)