sql

All things SQL and JDBC...
2020-07-16T08:39:14.225200Z

are you somehow using lazy seq's to do the inserts?

Carmine Casciato 2020-07-16T10:24:09.226Z

@chrisblom possibly? Sorry, still a noob

(defn domainep-parse-insert
  [domainep-record]
  (let [{:keys [code libelle],
         {grandDomaine :code} :grandDomaine} domainep-record]
    (sqlhelpers/insert! ds :domaineProfessionel
                        {:code code,
                         :libelle libelle,
                         :grandDomaine grandDomaine})))

(map domainep-parse-insert domainep-data)

2020-07-16T12:12:11.226600Z

try

(doall (map domainep-parse-insert domainep-data))

2020-07-16T12:12:57.227600Z

map is lazily evaluated. The repl may just evaluate the first N elements to print them, an leave the rest

2020-07-16T12:13:13.228Z

doall forces evaluation of the whole sequence

2020-07-16T12:14:31.229300Z

fyi, if you don't need the results you can use (run! ...) instead of (doall (map ...))

2020-07-16T12:14:52.229600Z

See https://clojuredocs.org/clojure.core/run%21

Carmine Casciato 2020-07-16T13:21:40.229800Z

awesome, let me try run!

Carmine Casciato 2020-07-16T13:26:39.230300Z

Looks like it's working! thanks so much @chrisblom!