jeremydaly / data-api-client

A "DocumentClient" for the Amazon Aurora Serverless Data API
MIT License
439 stars 61 forks source link

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

Open idanlo opened 3 years ago

idanlo commented 3 years ago

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!