Back
for-insert-multi (clj)
(source)function
(for-insert-multi table cols rows opts)
Given a table name, a vector of column names, and a vector of row values
(each row is a vector of its values), return a vector of the full `INSERT`
SQL string and its parameters.
Applies any `:table-fn` / `:column-fn` supplied in the options.
If `:batch` is set to `true` in `opts` the INSERT statement will be prepared
using a single set of placeholders and remaining parameters in the vector will
be grouped at the row level.
If `:suffix` is provided in `opts`, that string is appended to the
`INSERT ...` statement.