Re: clojure java.jdbc db-do-prepared and dynamic parameters

2013-12-09 Thread Niels van Klaveren
I think the OP just meant to ask how to do a PreparedStatement batch update in clojure.jdbc. The simplest answer is, just give in multiple parameter vectors to db-do-prepared (sql/db-do-prepared db "INSERT INTO fruit2 ( name, appearance, cost, grade ) VALUES ( ?, ?, ?, ?

Re: clojure java.jdbc db-do-prepared and dynamic parameters

2013-12-08 Thread Sean Corfield
Do you want that specific piece of (procedural) Java converted to Clojure or do you have a real use case in the context of a real problem that you're trying to solve? I suspect just showing you what that piece of Java would look like in Clojure isn't going to teach you how to do this in general...

clojure java.jdbc db-do-prepared and dynamic parameters

2013-12-08 Thread Avinash Dongre
I see following example in Clojure.java.jdbc (sql/db-do-prepared db "INSERT INTO fruit2 ( name, appearance, cost, grade ) VALUES ( ?, ?, ?, ? )" ["test" "test" 1 1.0]) But how do i convert following java code into clojure. I am new to clojure and not sure how to i pass multiple vector final