bug fixed for exprList

This commit is contained in:
wenshao
2014-06-01 11:36:26 +08:00
parent fc5ecf5de4
commit 4df624ae4b
15 changed files with 78 additions and 65 deletions
@@ -25,6 +25,7 @@ public class SQLSelectOrderByItem extends SQLObjectImpl {
protected SQLExpr expr;
protected String collate;
protected SQLOrderingSpecification type;
protected NullsOrderType nullsOrderType;
public SQLSelectOrderByItem(){
@@ -60,6 +61,14 @@ public class SQLSelectOrderByItem extends SQLObjectImpl {
public void setType(SQLOrderingSpecification type) {
this.type = type;
}
public NullsOrderType getNullsOrderType() {
return this.nullsOrderType;
}
public void setNullsOrderType(NullsOrderType nullsOrderType) {
this.nullsOrderType = nullsOrderType;
}
protected void accept0(SQLASTVisitor visitor) {
if (visitor.visit(this)) {
@@ -95,4 +104,19 @@ public class SQLSelectOrderByItem extends SQLObjectImpl {
return true;
}
public static enum NullsOrderType {
NullsFirst, NullsLast;
public String toFormalString() {
if (NullsFirst.equals(this)) {
return "NULLS FIRST";
}
if (NullsLast.equals(this)) {
return "NULLS LAST";
}
throw new IllegalArgumentException();
}
}
}