Fork me on GitHub
#sql
<
2020-07-16
>
chrisblom08:07:14

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

Carmine Casciato10:07:09

@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)

chrisblom12:07:11

try

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

chrisblom12:07:57

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

chrisblom12:07:13

doall forces evaluation of the whole sequence

chrisblom12:07:31

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

Carmine Casciato13:07:40

awesome, let me try run!

Carmine Casciato13:07:39

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