This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-04-07
Channels
- # beginners (41)
- # boot (38)
- # cider (17)
- # cljs-dev (52)
- # cljsjs (3)
- # clojure (200)
- # clojure-italy (8)
- # clojure-russia (50)
- # clojure-spec (28)
- # clojure-uk (45)
- # clojurescript (28)
- # core-async (9)
- # core-matrix (2)
- # cursive (16)
- # datascript (15)
- # datomic (50)
- # dirac (5)
- # emacs (20)
- # figwheel (8)
- # flambo (2)
- # hoplon (10)
- # incanter (1)
- # jobs (1)
- # leiningen (2)
- # lumo (26)
- # mount (171)
- # off-topic (22)
- # om (54)
- # onyx (2)
- # pedestal (27)
- # re-frame (10)
- # reagent (12)
- # ring (27)
- # ring-swagger (3)
- # rum (2)
- # slack-help (1)
- # spacemacs (134)
- # specter (6)
- # sql (15)
- # testing (20)
- # uncomplicate (5)
- # unrepl (49)
- # untangled (9)
- # yada (29)
Does this batch insert in YeSQL? (insert-stuff<! [{:name "joe"} {:name "sally"} ...])
or rather, is that the proper way to batch insert in YeSQL?
by feeding the fn a vector of maps, instead of just maps
Hm, i think not, is there a way to batch insert with YeSQL?
@josh.freckleton there are 2 open yesql PR's about batch insert (https://github.com/krisajenkins/yesql/pull/145 & https://github.com/krisajenkins/yesql/pull/135)...neither have been merged in or released...
nowadays, I generally just recommend people use jdbc directly with honeysql (https://github.com/jkk/honeysql), which would allow you to compose an efficient insert into
statement without much fuss
@tanzoniteblack thanks for the recommendation, I've been playnig with honeysql for the past hour, and, well it works great for generating a batch insert
I can't quite solve upserts tho
like REPLACE, or INSERT ON DUPLICATE KEY UPDATE
@josh.freckleton which DB are you using? on duplicate key update
is mysql, right?
sorry, yes it is
I know for postgres, there's a honeysql extension (https://github.com/nilenso/honeysql-postgres) that supports postgres's specific on conflict
insert command
but don't have any experience doing a similar thing with mysql
thanks for the recommendation. this shouldn't be so hard, but I guess that's what you get when you've been cranking all day and its a friday 😉