Merge pull request #408 from owenludong/master

修复 OracleOutputVisitor.java 在输出hint时候 输出错误的问题
This commit is contained in:
温高铁
2013-07-30 18:38:36 -07:00
3 changed files with 42 additions and 8 deletions
@@ -566,8 +566,12 @@ public class OracleOutputVisitor extends SQLASTOutputVisitor implements OracleAS
}
public boolean visit(OracleSelectQueryBlock x) {
print("SELECT ");
print("SELECT ");
if (x.getHints().size() > 0) {
printAndAccept(x.getHints(), ", ");
}
if (SQLSetQuantifier.ALL == x.getDistionOption()) {
print("ALL ");
} else if (SQLSetQuantifier.DISTINCT == x.getDistionOption()) {
@@ -576,12 +580,6 @@ public class OracleOutputVisitor extends SQLASTOutputVisitor implements OracleAS
print("UNIQUE ");
}
if (x.getHints().size() > 0) {
print("/*+");
printAndAccept(x.getHints(), ", ");
print("*/ ");
}
printSelectList(x.getSelectList());
if (x.getInto() != null) {
@@ -1301,7 +1301,7 @@ public class SQLASTOutputVisitor extends SQLASTVisitorAdapter {
public boolean visit(SQLCommentHint x) {
print("/*");
print(x.getText());
print("*/");
print("*/ ");
return false;
}