本文整理了Java中org.h2.command.dml.Query.getColumnCount
方法的一些代码示例,展示了Query.getColumnCount
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.getColumnCount
方法的具体详情如下:
包路径:org.h2.command.dml.Query
类名称:Query
方法名:getColumnCount
[英]Get the column count of this query.
[中]获取此查询的列计数。
代码示例来源:origin: com.h2database/h2
@Override
public int getColumnCount() {
return left.getColumnCount();
}
代码示例来源:origin: com.h2database/h2
public LocalResult getEmptyResult() {
int columnCount = left.getColumnCount();
return new LocalResult(session, expressionArray, columnCount);
}
代码示例来源:origin: com.h2database/h2
private Expression getExpression() {
if (expression == null) {
ArrayList<Expression> expressions = query.getExpressions();
int columnCount = query.getColumnCount();
if (columnCount == 1) {
expression = expressions.get(0);
} else {
Expression[] list = new Expression[columnCount];
for (int i = 0; i < columnCount; i++) {
list[i] = expressions.get(i);
}
expression = new ExpressionList(list);
}
}
return expression;
}
代码示例来源:origin: com.h2database/h2
@Override
public ResultInterface queryMeta() {
int columnCount = left.getColumnCount();
LocalResult result = new LocalResult(session, expressionArray, columnCount);
result.done();
return result;
}
代码示例来源:origin: com.h2database/h2
@Override
public void init() {
if (SysProperties.CHECK && checkInit) {
DbException.throwInternalError();
}
checkInit = true;
left.init();
right.init();
int len = left.getColumnCount();
if (len != right.getColumnCount()) {
throw DbException.get(ErrorCode.COLUMN_COUNT_DOES_NOT_MATCH);
}
ArrayList<Expression> le = left.getExpressions();
// set the expressions to get the right column count and names,
// but can't validate at this time
expressions = New.arrayList();
for (int i = 0; i < len; i++) {
Expression l = le.get(i);
expressions.add(l);
}
}
代码示例来源:origin: com.h2database/h2
@Override
public Expression optimize(Session session) {
left = left.optimize(session);
query.setRandomAccessResult(true);
session.optimizeQueryExpression(query);
if (query.getColumnCount() != 1) {
throw DbException.get(ErrorCode.SUBQUERY_IS_NOT_SINGLE_COLUMN);
}
// Can not optimize: the data may change
return this;
}
代码示例来源:origin: com.h2database/h2
if (query.getColumnCount() != columns.length) {
throw DbException.get(ErrorCode.COLUMN_COUNT_DOES_NOT_MATCH);
代码示例来源:origin: com.h2database/h2
left.prepare();
right.prepare();
int len = left.getColumnCount();
代码示例来源:origin: com.h2database/h2
private void generateColumnsFromQuery() {
int columnCount = asQuery.getColumnCount();
ArrayList<Expression> expressions = asQuery.getExpressions();
ColumnNamer columnNamer= new ColumnNamer(session);
代码示例来源:origin: com.h2database/h2
if (query.getColumnCount() != columns.length) {
throw DbException.get(ErrorCode.COLUMN_COUNT_DOES_NOT_MATCH);
代码示例来源:origin: com.h2database/h2
if (query.getColumnCount() != columns.length) {
throw DbException.get(ErrorCode.COLUMN_COUNT_DOES_NOT_MATCH);
代码示例来源:origin: com.h2database/h2
if (query.getColumnCount() != columns.length) {
throw DbException.get(ErrorCode.COLUMN_COUNT_DOES_NOT_MATCH);
代码示例来源:origin: com.h2database/h2
ArrayList<Column> list = New.arrayList();
ColumnNamer columnNamer = new ColumnNamer(session);
for (int i = 0, count = compiledQuery.getColumnCount(); i < count; i++) {
Expression expr = expressions.get(i);
String name = null;
代码示例来源:origin: com.h2database/h2
if (data.columns.isEmpty()) {
generateColumnsFromQuery();
} else if (data.columns.size() != asQuery.getColumnCount()) {
throw DbException.get(ErrorCode.COLUMN_COUNT_DOES_NOT_MATCH);
代码示例来源:origin: com.h2database/h2
int columnCount = left.getColumnCount();
if (session.isLazyQueryExecution() && unionType == UnionType.UNION_ALL && !distinct &&
sort == null && !randomAccessResult && !isForUpdate &&
代码示例来源:origin: com.eventsourcing/h2
@Override
public ResultInterface queryMeta() {
int columnCount = left.getColumnCount();
LocalResult result = new LocalResult(session, expressionArray, columnCount);
result.done();
return result;
}
代码示例来源:origin: org.wowtools/h2
@Override
public ResultInterface queryMeta() {
int columnCount = left.getColumnCount();
LocalResult result = new LocalResult(session, expressionArray, columnCount);
result.done();
return result;
}
代码示例来源:origin: com.h2database/com.springsource.org.h2
public LocalResult queryMeta() throws SQLException {
ObjectArray expressions = left.getExpressions();
int columnCount = left.getColumnCount();
LocalResult result = new LocalResult(session, expressions, columnCount);
result.done();
return result;
}
代码示例来源:origin: com.eventsourcing/h2
@Override
public Expression optimize(Session session) {
left = left.optimize(session);
query.setRandomAccessResult(true);
session.optimizeQueryExpression(query);
if (query.getColumnCount() != 1) {
throw DbException.get(ErrorCode.SUBQUERY_IS_NOT_SINGLE_COLUMN);
}
// Can not optimize: the data may change
return this;
}
代码示例来源:origin: org.wowtools/h2
@Override
public Expression optimize(Session session) {
left = left.optimize(session);
query.setRandomAccessResult(true);
session.optimizeQueryExpression(query);
if (query.getColumnCount() != 1) {
throw DbException.get(ErrorCode.SUBQUERY_IS_NOT_SINGLE_COLUMN);
}
// Can not optimize: the data may change
return this;
}
内容来源于网络,如有侵权,请联系作者删除!