-
Notifications
You must be signed in to change notification settings - Fork 624
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3654 from techee/sql_preproc
SQL: Skip PL/SQL selection directives and add sanity check for inquiry directive size
- Loading branch information
Showing
4 changed files
with
117 additions
and
7 deletions.
There are no files selected for viewing
3 changes: 3 additions & 0 deletions
3
Units/parser-sql.r/sql-plsql-selection-directive.d/args.ctags
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--sort=no | ||
--extras=+q | ||
--kinds-SQL=+d |
7 changes: 7 additions & 0 deletions
7
Units/parser-sql.r/sql-plsql-selection-directive.d/expected.tags
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
demo_pkg input.sql /^create or replace package body demo_pkg is$/;" P | ||
demo_pkg.test_func1 input.sql /^function test_func1 return INTEGER$/;" f package:demo_pkg | ||
test_func1 input.sql /^function test_func1 return INTEGER$/;" f package:demo_pkg | ||
demo_pkg.test_func2 input.sql /^function test_func2 return INTEGER$/;" f package:demo_pkg | ||
test_func2 input.sql /^function test_func2 return INTEGER$/;" f package:demo_pkg | ||
demo_pkg.test_func5 input.sql /^function test_func5 return INTEGER$/;" f package:demo_pkg | ||
test_func5 input.sql /^function test_func5 return INTEGER$/;" f package:demo_pkg |
42 changes: 42 additions & 0 deletions
42
Units/parser-sql.r/sql-plsql-selection-directive.d/input.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
create or replace package body demo_pkg is | ||
|
||
function test_func1 return INTEGER | ||
as | ||
begin | ||
return 1; | ||
end; | ||
|
||
$IF $$MY_VERSION_CODE > 3 $THEN | ||
|
||
function test_func2 return INTEGER | ||
as | ||
begin | ||
return 3; | ||
end; | ||
|
||
$ELSIF $$MY_VERSION_CODE > 5 $THEN | ||
|
||
function test_func3 return INTEGER | ||
as | ||
begin | ||
return 5; | ||
end; | ||
|
||
$ELSE | ||
|
||
function test_func4 return INTEGER | ||
as | ||
begin | ||
return 7; | ||
end; | ||
|
||
$END | ||
|
||
function test_func5 return INTEGER | ||
as | ||
begin | ||
return 9; | ||
end; | ||
|
||
end demo_pkg; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters