本文整理了Java中org.h2.command.dml.Query.isEverything
方法的一些代码示例,展示了Query.isEverything
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.isEverything
方法的具体详情如下:
包路径:org.h2.command.dml.Query
类名称:Query
方法名:isEverything
[英]Visit all expressions and subqueries in this query using the visitor pattern.
[中]使用访问者模式访问此查询中的所有表达式和子查询。
代码示例来源:origin: com.h2database/h2
@Override
public boolean isDeterministic() {
if (allowRecursive || viewQuery == null) {
return false;
}
return viewQuery.isEverything(ExpressionVisitor.DETERMINISTIC_VISITOR);
}
代码示例来源:origin: com.h2database/h2
@Override
public boolean isEverything(ExpressionVisitor visitor) {
return left.isEverything(visitor) && right.isEverything(visitor);
}
代码示例来源:origin: com.h2database/h2
@Override
public boolean isEverything(ExpressionVisitor visitor) {
return query.isEverything(visitor);
}
代码示例来源:origin: com.h2database/h2
@Override
public boolean isEverything(ExpressionVisitor visitor) {
return query.isEverything(visitor);
}
代码示例来源:origin: com.h2database/h2
@Override
public boolean isEverything(ExpressionVisitor visitor) {
return left.isEverything(visitor) && query.isEverything(visitor);
}
代码示例来源:origin: com.h2database/h2
public final long getMaxDataModificationId() {
ExpressionVisitor visitor = ExpressionVisitor.getMaxModificationIdVisitor();
isEverything(visitor);
return visitor.getMaxDataModificationId();
}
}
代码示例来源:origin: com.h2database/h2
@Override
public boolean isQueryComparable() {
if (!super.isQueryComparable()) {
return false;
}
for (Table t : tables) {
if (!t.isQueryComparable()) {
return false;
}
}
if (topQuery != null &&
!topQuery.isEverything(ExpressionVisitor.QUERY_COMPARABLE_VISITOR)) {
return false;
}
return true;
}
代码示例来源:origin: com.h2database/h2
/**
* Check if the expression can be evaluated.
*
* @return true if it can be evaluated
*/
public boolean isEvaluatable() {
if (expression != null) {
return expression
.isEverything(ExpressionVisitor.EVALUATABLE_VISITOR);
}
if (expressionList != null) {
for (Expression e : expressionList) {
if (!e.isEverything(ExpressionVisitor.EVALUATABLE_VISITOR)) {
return false;
}
}
return true;
}
return expressionQuery
.isEverything(ExpressionVisitor.EVALUATABLE_VISITOR);
}
代码示例来源:origin: com.h2database/h2
private boolean sameResultAsLast(Session s, Value[] params,
Value[] lastParams, long lastEval) {
if (!cacheableChecked) {
long max = getMaxDataModificationId();
noCache = max == Long.MAX_VALUE;
cacheableChecked = true;
}
if (noCache) {
return false;
}
Database db = s.getDatabase();
for (int i = 0; i < params.length; i++) {
Value a = lastParams[i], b = params[i];
if (a.getType() != b.getType() || !db.areEqual(a, b)) {
return false;
}
}
if (!isEverything(ExpressionVisitor.DETERMINISTIC_VISITOR) ||
!isEverything(ExpressionVisitor.INDEPENDENT_VISITOR)) {
return false;
}
if (db.getModificationDataId() > lastEval &&
getMaxDataModificationId() > lastEval) {
return false;
}
return true;
}
代码示例来源:origin: com.h2database/h2
@Override
public void createIndexConditions(Session session, TableFilter filter) {
if (!session.getDatabase().getSettings().optimizeInList) {
return;
}
if (!(left instanceof ExpressionColumn)) {
return;
}
ExpressionColumn l = (ExpressionColumn) left;
if (filter != l.getTableFilter()) {
return;
}
ExpressionVisitor visitor = ExpressionVisitor.getNotFromResolverVisitor(filter);
if (!query.isEverything(visitor)) {
return;
}
filter.addIndexCondition(IndexCondition.getInQuery(l, query));
}
代码示例来源:origin: com.h2database/h2
if (isEverything(ExpressionVisitor.DETERMINISTIC_VISITOR)) {
if (lastResult != null && !lastResult.isClosed() &&
limit == lastLimit) {
代码示例来源:origin: org.wowtools/h2
@Override
public boolean isDeterministic() {
if (recursive || viewQuery == null) {
return false;
}
return viewQuery.isEverything(ExpressionVisitor.DETERMINISTIC_VISITOR);
}
代码示例来源:origin: org.wowtools/h2
@Override
public boolean isEverything(ExpressionVisitor visitor) {
return left.isEverything(visitor) && right.isEverything(visitor);
}
代码示例来源:origin: com.eventsourcing/h2
@Override
public boolean isEverything(ExpressionVisitor visitor) {
return query.isEverything(visitor);
}
代码示例来源:origin: org.wowtools/h2
@Override
public boolean isEverything(ExpressionVisitor visitor) {
return query.isEverything(visitor);
}
代码示例来源:origin: org.wowtools/h2
@Override
public boolean isEverything(ExpressionVisitor visitor) {
return query.isEverything(visitor);
}
代码示例来源:origin: com.eventsourcing/h2
@Override
public boolean isEverything(ExpressionVisitor visitor) {
return query.isEverything(visitor);
}
代码示例来源:origin: com.eventsourcing/h2
@Override
public boolean isEverything(ExpressionVisitor visitor) {
return left.isEverything(visitor) && query.isEverything(visitor);
}
代码示例来源:origin: org.wowtools/h2
public final long getMaxDataModificationId() {
ExpressionVisitor visitor = ExpressionVisitor.getMaxModificationIdVisitor();
isEverything(visitor);
return visitor.getMaxDataModificationId();
}
代码示例来源:origin: com.h2database/com.springsource.org.h2
public final long getMaxDataModificationId() {
ExpressionVisitor visitor = ExpressionVisitor.get(ExpressionVisitor.SET_MAX_DATA_MODIFICATION_ID);
isEverything(visitor);
return visitor.getMaxDataModificationId();
}
内容来源于网络,如有侵权,请联系作者删除!