improved pg sql parser. for issue #2390

This commit is contained in:
wenshao
2018-03-11 00:03:11 +08:00
parent a69b5ddcbc
commit b5386ce9d0
6 changed files with 151 additions and 0 deletions
@@ -6300,4 +6300,11 @@ public class SQLASTOutputVisitor extends SQLASTVisitorAdapter implements Paramet
return false;
}
@Override
public boolean visit(SQLValuesExpr x) {
print0(ucase ? "VALUES (" : "values (");
printAndAccept(x.getValues(), ", ");
return false;
}
}
@@ -826,4 +826,7 @@ public interface SQLASTVisitor {
boolean visit(SQLAlterTableExchangePartition x);
void endVisit(SQLAlterTableExchangePartition x);
boolean visit(SQLValuesExpr x);
void endVisit(SQLValuesExpr x);
}
@@ -1954,6 +1954,16 @@ public class SQLASTVisitorAdapter implements SQLASTVisitor {
}
@Override
public boolean visit(SQLValuesExpr x) {
return true;
}
@Override
public void endVisit(SQLValuesExpr x) {
}
public final boolean isEnabled(VisitorFeature feature) {
return VisitorFeature.isEnabled(this.features, feature);
}