提交 7f4fa88a authored 作者: tledkov-gridgain's avatar tledkov-gridgain

#1405 Introduce LocalResult factory: fix review issues

上级 9b1c4408
......@@ -72,7 +72,7 @@ public class Explain extends Prepared {
Database db = session.getDatabase();
ExpressionColumn expr = new ExpressionColumn(db, column);
Expression[] expressions = { expr };
result = session.getDatabase().getResultFactory().create(session, expressions, 1);
result = db.getResultFactory().create(session, expressions, 1);
if (maxrows >= 0) {
String plan;
if (executeCommand) {
......
......@@ -128,7 +128,7 @@ public final class GeneratedKeys {
Database db = session.getDatabase();
if (Boolean.FALSE.equals(generatedKeysRequest)) {
clear(null);
return session.getDatabase().getResultFactory().create();
return db.getResultFactory().create();
}
ArrayList<ExpressionColumn> expressionColumns;
if (Boolean.TRUE.equals(generatedKeysRequest)) {
......@@ -152,7 +152,7 @@ public final class GeneratedKeys {
}
} else {
clear(null);
return session.getDatabase().getResultFactory().create();
return db.getResultFactory().create();
}
} else if (generatedKeysRequest instanceof String[]) {
if (table != null) {
......@@ -182,16 +182,16 @@ public final class GeneratedKeys {
}
} else {
clear(null);
return session.getDatabase().getResultFactory().create();
return db.getResultFactory().create();
}
} else {
clear(null);
return session.getDatabase().getResultFactory().create();
return db.getResultFactory().create();
}
int columnCount = expressionColumns.size();
if (columnCount == 0) {
clear(null);
return session.getDatabase().getResultFactory().create();
return db.getResultFactory().create();
}
LocalResult result = session.getDatabase().getResultFactory().create(session,
expressionColumns.toArray(new Expression[0]), columnCount);
......
......@@ -86,7 +86,7 @@ public class TableFunction extends Function {
ExpressionColumn col = new ExpressionColumn(db, c);
header[i] = col;
}
LocalResult result = session.getDatabase().getResultFactory().create(session, header, len);
LocalResult result = db.getResultFactory().create(session, header, len);
if (distinctRows) {
result.setDistinct();
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论