提交 77649d06 authored 作者: Evgenij Ryazanov's avatar Evgenij Ryazanov

Add Select.setWildcard()

上级 7be0ae32
......@@ -1463,9 +1463,7 @@ public class Parser {
command.setSourceTableFilter(sourceTableFilter);
Select preparedQuery = new Select(session);
ArrayList<Expression> expr = new ArrayList<>(1);
expr.add(new Wildcard(null, null));
preparedQuery.setExpressions(expr);
preparedQuery.setWildcard();
TableFilter filter = new TableFilter(session, sourceTableFilter.getTable(),
sourceTableFilter.getTableAlias(), rightsChecked, preparedQuery, 0, null);
preparedQuery.addTableFilter(filter, true);
......@@ -5130,9 +5128,7 @@ public class Parser {
Select command = new Select(session);
currentSelect = command;
TableFilter filter = parseValuesTable(0);
ArrayList<Expression> list = new ArrayList<>(1);
list.add(new Wildcard(null, null));
command.setExpressions(list);
command.setWildcard();
command.addTableFilter(filter, true);
command.init();
return command;
......
......@@ -25,6 +25,7 @@ import org.h2.expression.Expression;
import org.h2.expression.ExpressionColumn;
import org.h2.expression.ExpressionVisitor;
import org.h2.expression.Parameter;
import org.h2.expression.Wildcard;
import org.h2.index.Cursor;
import org.h2.index.Index;
import org.h2.index.IndexType;
......@@ -171,6 +172,11 @@ public class Select extends Query {
this.expressions = expressions;
}
public void setWildcard() {
expressions = new ArrayList<>(1);
expressions.add(new Wildcard(null, null));
}
/**
* Called if this query contains aggregate functions.
*/
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论