improved sql parser.

This commit is contained in:
wenshao
2017-06-15 09:50:49 +08:00
parent 4be1b561de
commit 0528af3207
20 changed files with 296 additions and 172 deletions
@@ -19,6 +19,7 @@ import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import com.alibaba.druid.sql.SQLUtils;
import com.alibaba.druid.sql.ast.SQLExpr;
import com.alibaba.druid.sql.ast.SQLExprImpl;
import com.alibaba.druid.sql.ast.SQLKeep;
@@ -115,6 +116,10 @@ public class SQLAggregateExpr extends SQLExprImpl implements Serializable {
this.ignoreNulls = ignoreNulls;
}
public String toString() {
return SQLUtils.toSQLString(this);
}
@Override
protected void accept0(SQLASTVisitor visitor) {
@@ -1,3 +1,18 @@
/*
* Copyright 1999-2017 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;
import com.alibaba.druid.sql.ast.SQLExpr;
@@ -17,6 +17,7 @@ package com.alibaba.druid.sql.ast.statement;
import java.util.List;
import com.alibaba.druid.sql.ast.SQLExpr;
import com.alibaba.druid.sql.ast.SQLHint;
import com.alibaba.druid.sql.ast.SQLObject;
@@ -31,4 +32,7 @@ public interface SQLTableSource extends SQLObject {
SQLTableSource clone();
String computeAlias();
SQLExpr getFlashback();
void setFlashback(SQLExpr flashback);
}