This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-04-18
Channels
- # announcements (1)
- # aws (13)
- # beginners (55)
- # calva (8)
- # cider (73)
- # cljs-dev (96)
- # clojure (119)
- # clojure-europe (4)
- # clojure-italy (41)
- # clojure-nl (14)
- # clojure-uk (6)
- # clojurescript (90)
- # cursive (14)
- # data-science (1)
- # datomic (20)
- # dirac (1)
- # emacs (32)
- # figwheel-main (11)
- # fulcro (81)
- # hoplon (2)
- # jobs (1)
- # lein-figwheel (2)
- # luminus (1)
- # lumo (19)
- # nyc (3)
- # off-topic (60)
- # other-languages (1)
- # pedestal (5)
- # quil (1)
- # re-frame (3)
- # reagent (3)
- # reitit (5)
- # remote-jobs (1)
- # ring-swagger (2)
- # shadow-cljs (43)
- # sql (15)
- # tools-deps (20)
- # vim (21)
- # yada (6)
Should I just skip using these clojure libraries and just resort to using a mixture of sql + bash scripts?
I haven't used ragtime, but I've used similar things and if I recall this has to do with jdbc
jdbc isn't the same as pasting sql statements in to a command line client (mysql, or psql), have to execute each statement as an individual thing, and in order to know how to split a .sql file into statements, a common convention is --;;
I forget exactly what the issue is with splitting on ';', I vaguely recall there is one (although our home grown migration library where I work now does split on ';' and it hasn't been a problem)
@hiredman Does putting --;;
between each line work when there are local vars? (i.e. SET @ins_id1 = LAST_INSERT_ID();
)
I tried this and it seems that the local var is null
ragtime maybe executing each statement one by one effectively each in their own transaction, but I never use set
like that, so I am not sure what the scope for those values is
https://github.com/weavejester/ragtime/issues/107 and I guess there are issues running migrations in a transaction in the general case