how do you handle big tables with multple columns in an execute! block?
Not sure what you're asking here? Execute! accepts regular SQL...
The real question was :D i have an insert into with lots of fields 16+ how can i do the insert dynamically is that even possible ootb or do i have to write that on my own. Something like
(defn insert [fields]
(execute! db ["insert into(all, my, fields, ...) values (?,?,?,...)" fields]))(next.jdbc.sql/insert! db :table {hash map of data}) perhaps?
Or maybe look at HoneySQL to generate SQL for you?
Exactly what i was looking for sorry for not looking that up on my own
Here's all the built-in "friendly" functions that generate SQL: https://cljdoc.org/d/com.github.seancorfield/next.jdbc/1.3.939/doc/getting-started/friendly-sql-functions
If you need something more sophisticated, use HoneySQL.
No clue why but i wanted to avoid it as long as possible. Guess i'll end up with it like all others before.
And this is exactly what i had in mind while thinking about the problemhow to implement it https://github.com/seancorfield/next-jdbc/blob/a6ecdee5ac14ecebb04164b7a856db50b611ae12/src/next/jdbc/sql/builder.clj#L125
as i allready pointed out 😄 i'm at the point that i'll include honeysql 😄
Lots of help available in #honeysql (and here for the non-HoneySQL parts)! 🙂