data-api-client icon indicating copy to clipboard operation
data-api-client copied to clipboard

Batch insert only works when you are not adding an escape character (;) at the end

Open idanlo opened this issue 4 years ago • 0 comments

Hey there. I'm loving this library so far, and have gone as far as adding types to it! One thing I have noticed is - in order to perform batch INSERT statements, you have to send your query without the ; at the end, for example: INSERT INTO TABLE () VALUES (); would not work with an array as the second parameter (or the parameters field as object notation), you have to send it as INSERT INTO TABLE () VALUES () - I assume this is because the library code simply takes the parameters and adds them to the query string. This is something that you should probably put in the README.md (if it is already there please let me know and I will close this).

Thank you very much for this library!

idanlo avatar Jan 20 '21 15:01 idanlo