INSERT
INTO mytable (col1, col2, col3)
VALUES (col1_value1, col2_value1, col3_value1), (col1_value2, col2_value2, col3_value2)
Correct me if I'm just being foolish, but this would require us to pass to it an Iterable[Map[String,Any]], wouldn't in? Basically for each new row a map of columnName->columnValue .
However, executeBatch takes a parameter batchValues:(String,Traversable[_]) and a parameter parms:Map[String,Any]. Looking at the code it seems that it uses params for all rows to which it glues one extra, unique, column from batchValues. This would be for rows that have all but one column identical. So:
INSERT
INTO mytable (col1, col2, col3)
VALUES (col1_value, col2_value, col3_value1), (col1_value, col2_value, col3_value2)
Is my understanding of how this works correct? And if yes, is it possible to actually specify different values for all columns?