I was trying to do batch insert and update in Clojure but I'm having some problems.
Libraries that I use are: clojure.java.jdbc and postgresql.
There are some examples on the internet but I could not make it working, I ended up getting exceptions like this:
CompilerException java.sql.BatchUpdateException: Batch entry 0 INSERT INTO person ( data, age ) VALUES ( 'ertu', '24' ) was aborted. Call getNextException to see the cause.
or
CompilerException clojure.lang.ArityException: Wrong number of args (6) passed to: jdbc/db-do-prepared
I'm trying to pass maps or vectors but it does not work so far.
Could you provide some concrete examples that clojure.java.jdbc/insert! and clojure.java.jdbc/update! work?
Also found this question but did not understand what (first stmts) and (rest stmts) are.