-
Notifications
You must be signed in to change notification settings - Fork 175
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
[feature] enhance Execute script KW to support more statement blocks #184
Comments
Another example related to the parsing change (?), which was working fine with DatabaseLibrary 1.2.x: Robot code:
hsexport.py
getting:
|
I think it would be good to have one KW that would run everything in the file as it is without any parsing. |
The issue is more complicated than I suggested. I slightly improved splitting the SQL script files into statements - now some more statements blocks of a PL/SQL script for Oracle are processed correctly, like the one in the issue description. However, I found out that I was just scratching on the surface. |
The keyword |
Also, I've added a new parameter Some explanation:
|
The version 1.4.2 with the fix will be released till the end of the week. |
Hi,
Currently,
Execute Script
keyword is dividing statements based on the semicolon sign (;) - and executes them separately later on.Unless the semicolon is inside a statements block - it is treated as an exception and all the statements inside are executed together, even if they contain a semicolon (and they must contain one, otherwise it’s an invalid script for Oracle).
But not all possible statements blocks are currently supported.
In fact, it’s only a simple BEGIN - END block which is supported.
Here is an example of a simple script which does work. So the IF block is split just in the middle - which resulted in a wrong statement.
The „END ONDREJ;“ line won’t also work by the way - the current version of the library won’t understand the procedure name after the „END“ statement.
Feature request: support more statement blocks, including IF/ELSE. Or to find some more universal way to divide the statements.
Example script that currently doesn't work:
Example Robot script to execute above:
Based on our Slack discussion: https://app.slack.com/client/T07PJQ9S7/C5M9S3482/thread/C5M9S3482-1693825842.922829
The text was updated successfully, but these errors were encountered: