-
Notifications
You must be signed in to change notification settings - Fork 161
multiple statements fail - expected behavior? #99
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
Comments
Yes, this is expected behaviour. Documentation and errors should be added. When you emulate this by splitting on semicolons take care, there might be semicolons in a single statement. |
Thanks - that's very helpful. For initializing complex table schemas, looks like I'll be either splitting a string literal on semicolons or on line-breaks, making sure that the split delimiter is placed carefully - rather than hard-coding each btw, I'm really liking this wrapper! feel free to close, as i think the question has been answered - unless you need a reminder about documenting this feature. |
I've noticed that when feeding in multiple semicolon-delimited statements as part of a single string, only the first statement is actually executed. for example:
The practical use case here is executing a whole bunch of statements to setup the schema when creating a new db.
if I split the string on semicolons and feed each string in, everything works. If this is expected behavior, it should probably be documented - even though I notice the the usage idioms only show examples of single statements.
The text was updated successfully, but these errors were encountered: