Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
idanlo opened this issue Jan 20, 2021 · 0 comments

Comments

@idanlo
Copy link

idanlo commented Jan 20, 2021

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant