improved sql parser.

This commit is contained in:
wenshao
2017-07-23 16:44:43 +08:00
parent 82fe08109f
commit 6829a23bce
41 changed files with 1183 additions and 514 deletions
@@ -15,6 +15,8 @@
*/
package com.alibaba.druid.sql.ast;
import com.alibaba.druid.sql.ast.expr.SQLIdentifierExpr;
import com.alibaba.druid.sql.ast.expr.SQLIntegerExpr;
import com.alibaba.druid.sql.dialect.mysql.visitor.MySqlASTVisitor;
import com.alibaba.druid.sql.visitor.SQLASTVisitor;
@@ -50,10 +52,18 @@ public class SQLLimit extends SQLObjectImpl {
this.rowCount = rowCount;
}
public void setRowCount(int rowCount) {
this.setRowCount(new SQLIntegerExpr(rowCount));
}
public SQLExpr getOffset() {
return offset;
}
public void setOffset(int offset) {
this.setOffset(new SQLIntegerExpr(offset));
}
public void setOffset(SQLExpr offset) {
if (offset != null) {
offset.setParent(this);