You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The query command accepts a single query only. If you need to send multiple queries, just call the method multiple times.
...However, I'm currently working on a use-case where the query source is coming from a previously authored .sql script file and splitting the statements is not a trivial task!
Consider for example the pagila sample schema upload SQL: Identifying statements is much more complex than simply splitting on ;, because of factors like commented-out semicolons and user-defined functions which include semicolons in their bodies.
It would be great if, even if this project doesn't want to take on multi-statement query support, we were able to provide guidance on how to tackle the splitting in the README. For now I've not yet found a reliable way to do it.
The text was updated successfully, but these errors were encountered:
I think it's doable, but I wonder to what extent it has to be tailored to each dialect of SQL. To constructs have multiple statements appearing inside of a BEGIN/END block for example.
Hi & thanks for a nice library!
I understood from the README that:
...However, I'm currently working on a use-case where the query source is coming from a previously authored
.sql
script file and splitting the statements is not a trivial task!Consider for example the pagila sample schema upload SQL: Identifying statements is much more complex than simply splitting on
;
, because of factors like commented-out semicolons and user-defined functions which include semicolons in their bodies.It would be great if, even if this project doesn't want to take on multi-statement query support, we were able to provide guidance on how to tackle the splitting in the README. For now I've not yet found a reliable way to do it.
The text was updated successfully, but these errors were encountered: