-
-
Notifications
You must be signed in to change notification settings - Fork 727
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
Add the ability to execute multiple SQL statements at once #6
Conversation
I'm no longer on vacation ;-)
I don't get it: executeMultiStatement() throws, and it's good to test that the thrown error contains all the precious debugging information! Besides this tiny nitpicking, I can already accept your PR right away. I would still:
If you still feel inspired, go ahead. I can take it over if you prefer. You've already done a great job. |
Working on these right now... On Mon, Aug 17, 2015 at 11:16 AM, Gwendal Roué [email protected]
|
Updated unit tests and README accordingly.
OK - I made some of your suggested updates. Didn't update RELEASE_NOTES On Mon, Aug 17, 2015 at 11:16 AM, Gwendal Roué [email protected]
|
Gorgeous, @peter-ss :-) Thanks a lot! Do you want write access to the repository? |
Version 0.8.0 has just shipped with your contribution. |
Excellent. I'm glad that I was able to contribute. On Mon, Aug 17, 2015 at 11:25 PM, Gwendal Roué [email protected]
|
…abase.executeMultiStatement() introduced by #6.
Hello @peter-ss. GRDB v0.37.0 has just shipped, and it has merged your try db.execute(
"INSERT INTO persons (name) VALUES (?);" +
"INSERT INTO persons (name) VALUES (?);" +
"INSERT INTO persons (name) VALUES (?);",
arguments; ['Harry', 'Ron', 'Hermione']) |
Added support for multiple-statement execution via a new API: Database.executeMultiStatement().
Adjusted unit tests accordingly. Removed unit test for catching error when a multi-statement SQL string is handed to db.execute(), since the code halts with a message to the dev in that case, instead of throwing an error.
I’d be happy to update any documentation with examples of use, if you’d like.