Closed rschmukler closed 2 years ago
That was fast -- thank you! I may do a little code-smithing on it (e.g., lifting the (if batch? 1 ..)
condition out since the str/join
and the repeat
are not needed in batch mode) but that all looks solid.
Tested on SQL Server (with MS and jTDS drivers) and MySQL (with MySQL and MariaDB drivers). All passes.
Added a check that all the columns are the same for all hash maps in the sequence (and a test for that).
Updated the Friendly SQL Functions section of the docs with examples of the new functionality.
Thank you!
Updates
insert-multi!
to support taking hash maps in addition torows
andcols
. Also introduces a:batch
flag which will callexecute-batch!
instead of the standardexecute!
Note: I didn't have all of the fixture databases (I dev'd against embedded postgres) available locally and it looks like CI doesn't run on PRs for first time contributors so it may be worth testing this locally before merging it.