Robotframework-Database-Library icon indicating copy to clipboard operation
Robotframework-Database-Library copied to clipboard

Parse SQL script files using external lib

Open amochin opened this issue 1 year ago • 0 comments

Fixing #184, 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. However, I found out that I was just scratching on the surface.

There are so many different statements, operators and SQL dialects, that there are extra projects, dedicated to splitting a script file into a list of statements. There is one, which I tried - sqlparse.

It worked pretty well for a SQL script with multiple PL/SQL blocks for MSSQL. It wasn't so good with a script for Oracle though (see create_stored_procedures script files in the tests folder). Anyway, it might be reasonable to with the current implementation of the Execute SQL Script keyword to using this external parser - and improve parsing Oracle scripts directly there.

amochin avatar Dec 19 '23 16:12 amochin