add testcase & remove unused code

This commit is contained in:
wenshao
2013-06-17 23:34:35 +08:00
parent b199d3043f
commit 72c9665577
75 changed files with 2415 additions and 1077 deletions
@@ -24,9 +24,9 @@ import com.alibaba.druid.sql.visitor.SQLASTVisitor;
public class SQLBinaryOpExpr extends SQLExprImpl implements Serializable {
private static final long serialVersionUID = 1L;
private SQLExpr left;
private SQLExpr right;
private SQLBinaryOperator operator;
private SQLExpr left;
private SQLExpr right;
private SQLBinaryOperator operator;
public SQLBinaryOpExpr(){
@@ -76,14 +76,6 @@ public class SQLBinaryOpExpr extends SQLExprImpl implements Serializable {
this.operator = operator;
}
public void output(StringBuffer buf) {
this.left.output(buf);
buf.append(" ");
buf.append(this.operator.name);
buf.append(" ");
this.right.output(buf);
}
protected void accept0(SQLASTVisitor visitor) {
if (visitor.visit(this)) {
acceptChild(visitor, this.left);
@@ -50,14 +50,6 @@ public class SQLCastExpr extends SQLExprImpl {
this.dataType = dataType;
}
public void output(StringBuffer buf) {
buf.append("CAST(");
this.expr.output(buf);
buf.append(" AS ");
this.dataType.output(buf);
buf.append(")");
}
protected void accept0(SQLASTVisitor visitor) {
if (visitor.visit(this)) {
acceptChild(visitor, this.expr);
@@ -1,56 +0,0 @@
/*
* Copyright 1999-2011 Alibaba Group Holding Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.alibaba.druid.sql.ast.expr;
public class SQLDateLiteralValue {
private int years;
private int months;
private int days;
public int getYears() {
return years;
}
public void setYears(int years) {
this.years = years;
}
public int getMonths() {
return months;
}
public void setMonths(int months) {
this.months = months;
}
public int getDays() {
return days;
}
public void setDays(int days) {
this.days = days;
}
public void output(StringBuffer buf) {
buf.append(years);
buf.append("-");
buf.append(months);
buf.append("-");
buf.append(days);
}
}