|
9 | 9 | */ |
10 | 10 | package net.sf.jsqlparser.statement; |
11 | 11 |
|
| 12 | +import net.sf.jsqlparser.statement.role.CreateRole; |
| 13 | +import net.sf.jsqlparser.statement.role.AlterRole; |
| 14 | +import net.sf.jsqlparser.statement.role.RoleOption; |
| 15 | +import net.sf.jsqlparser.statement.grant.Revoke; |
| 16 | +import net.sf.jsqlparser.statement.grant.AlterDefaultPrivileges; |
12 | 17 | import net.sf.jsqlparser.statement.create.type.CreateType; |
13 | 18 | import net.sf.jsqlparser.statement.alter.AlterType; |
14 | 19 | import net.sf.jsqlparser.statement.create.domain.CreateDomain; |
@@ -363,6 +368,11 @@ public <S> T visit(CreateTable createTable, S context) { |
363 | 368 |
|
364 | 369 | @Override |
365 | 370 | public <S> T visit(CreateTrigger createTrigger, S context) { |
| 371 | + createTrigger.visit(t -> t.accept(fromItemVisitor, context), |
| 372 | + e -> e.accept(expressionVisitor, context)); |
| 373 | + if (createTrigger.getBody() != null) { |
| 374 | + createTrigger.getBody().accept(this, context); |
| 375 | + } |
366 | 376 | return null; |
367 | 377 | } |
368 | 378 |
|
@@ -507,6 +517,8 @@ public <S> T visit(DeclareStatement declareStatement, S context) { |
507 | 517 |
|
508 | 518 | @Override |
509 | 519 | public <S> T visit(Grant grant, S context) { |
| 520 | + grant.getClause().visit(t -> t.accept(fromItemVisitor, context), |
| 521 | + e -> e.accept(expressionVisitor, context)); |
510 | 522 | return null; |
511 | 523 | } |
512 | 524 |
|
@@ -609,6 +621,47 @@ public <S> T visit(Export export, S context) { |
609 | 621 | return null; |
610 | 622 | } |
611 | 623 |
|
| 624 | + @Override |
| 625 | + public <S> T visit(CreateRole statement, S context) { |
| 626 | + for (RoleOption option : statement.getOptions()) { |
| 627 | + if (option.getValue() != null) { |
| 628 | + option.getValue().accept(expressionVisitor, context); |
| 629 | + } |
| 630 | + } |
| 631 | + return null; |
| 632 | + } |
| 633 | + |
| 634 | + @Override |
| 635 | + public <S> T visit(AlterRole statement, S context) { |
| 636 | + for (RoleOption option : statement.getOptions()) { |
| 637 | + if (option.getValue() != null) { |
| 638 | + option.getValue().accept(expressionVisitor, context); |
| 639 | + } |
| 640 | + } |
| 641 | + if (statement.getValues() != null) { |
| 642 | + statement.getValues().forEach(e -> e.accept(expressionVisitor, context)); |
| 643 | + } |
| 644 | + return null; |
| 645 | + } |
| 646 | + |
| 647 | + @Override |
| 648 | + public <S> T visit(Revoke statement, S context) { |
| 649 | + statement.getClause().visit(t -> t.accept(fromItemVisitor, context), |
| 650 | + e -> e.accept(expressionVisitor, context)); |
| 651 | + return null; |
| 652 | + } |
| 653 | + |
| 654 | + @Override |
| 655 | + public <S> T visit(AlterDefaultPrivileges statement, S context) { |
| 656 | + if (statement.getGrant() != null) { |
| 657 | + statement.getGrant().accept(this, context); |
| 658 | + } |
| 659 | + if (statement.getRevoke() != null) { |
| 660 | + statement.getRevoke().accept(this, context); |
| 661 | + } |
| 662 | + return null; |
| 663 | + } |
| 664 | + |
612 | 665 | @Override |
613 | 666 | public <S> T visit(CreateType statement, S context) { |
614 | 667 |
|
|
0 commit comments