Skip to content

Commit

Permalink
merge ddl target handling
Browse files Browse the repository at this point in the history
  • Loading branch information
bjrara committed Feb 28, 2024
1 parent 63c805d commit 1711c80
Showing 1 changed file with 2 additions and 46 deletions.
48 changes: 2 additions & 46 deletions instrumentation-api-incubator/src/main/jflex/SqlSanitizer.jflex
Original file line number Diff line number Diff line change
Expand Up @@ -439,54 +439,10 @@ WHITESPACE = [ \t\r\n]+
appendCurrentFragment();
if (isOverLimit()) return YYEOF;
}
"TABLE" {
if (!insideComment && !extractionDone) {
if (operation.expectingOperationTarget()) {
extractionDone = operation.handleOperationTarget("TABLE");
} else {
extractionDone = operation.handleIdentifier();
}
}
appendCurrentFragment();
if (isOverLimit()) return YYEOF;
}
"INDEX" {
if (!insideComment && !extractionDone) {
if (operation.expectingOperationTarget()) {
extractionDone = operation.handleOperationTarget("INDEX");
} else {
extractionDone = operation.handleIdentifier();
}
}
appendCurrentFragment();
if (isOverLimit()) return YYEOF;
}
"DATABASE" {
if (!insideComment && !extractionDone) {
if (operation.expectingOperationTarget()) {
extractionDone = operation.handleOperationTarget("DATABASE");
} else {
extractionDone = operation.handleIdentifier();
}
}
appendCurrentFragment();
if (isOverLimit()) return YYEOF;
}
"PROCEDURE" {
if (!insideComment && !extractionDone) {
if (operation.expectingOperationTarget()) {
extractionDone = operation.handleOperationTarget("PROCEDURE");
} else {
extractionDone = operation.handleIdentifier();
}
}
appendCurrentFragment();
if (isOverLimit()) return YYEOF;
}
"VIEW" {
"TABLE" | "INDEX" | "DATABASE" | "PROCEDURE" | "VIEW" {
if (!insideComment && !extractionDone) {
if (operation.expectingOperationTarget()) {
extractionDone = operation.handleOperationTarget("VIEW");
extractionDone = operation.handleOperationTarget(yytext());
} else {
extractionDone = operation.handleIdentifier();
}
Expand Down

0 comments on commit 1711c80

Please sign in to comment.