提交 6d4308dc authored 作者: noelgrandin's avatar noelgrandin

Expose limit/offset/distinct/having/group values as getter methods on Query for…

Expose limit/offset/distinct/having/group values as getter methods on Query for external TableEngine implementations
上级 9e1de76b
...@@ -210,6 +210,13 @@ public abstract class Query extends Prepared { ...@@ -210,6 +210,13 @@ public abstract class Query extends Prepared {
distinct = b; distinct = b;
} }
/**
* Exposed for external TableEngine implementations.
*/
public boolean isDistinct() {
return this.distinct;
}
/** /**
* Whether results need to support random access. * Whether results need to support random access.
* *
...@@ -479,10 +486,24 @@ public abstract class Query extends Prepared { ...@@ -479,10 +486,24 @@ public abstract class Query extends Prepared {
this.offsetExpr = offset; this.offsetExpr = offset;
} }
/**
* Exposed for external TableEngine implementations.
*/
public Expression getOffset() {
return this.offsetExpr;
}
public void setLimit(Expression limit) { public void setLimit(Expression limit) {
this.limitExpr = limit; this.limitExpr = limit;
} }
/**
* Exposed for external TableEngine implementations.
*/
public Expression getLimit() {
return this.limitExpr;
}
/** /**
* Add a parameter to the parameter list. * Add a parameter to the parameter list.
* *
......
...@@ -127,6 +127,13 @@ public class Select extends Query { ...@@ -127,6 +127,13 @@ public class Select extends Query {
this.group = group; this.group = group;
} }
/**
* Exposed for external TableEngine implementations.
*/
public ArrayList<Expression> getGroupBy() {
return this.group;
}
public HashMap<Expression, Object> getCurrentGroup() { public HashMap<Expression, Object> getCurrentGroup() {
return currentGroup; return currentGroup;
} }
...@@ -1086,6 +1093,13 @@ public class Select extends Query { ...@@ -1086,6 +1093,13 @@ public class Select extends Query {
this.having = having; this.having = having;
} }
/**
* Exposed for external TableEngine implementations.
*/
public Expression getHaving() {
return this.having;
}
public int getColumnCount() { public int getColumnCount() {
return visibleColumnCount; return visibleColumnCount;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论