org.h2.command.dml.Query.isEverything()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(4.9k)|赞(0)|评价(0)|浏览(282)

本文整理了Java中org.h2.command.dml.Query.isEverything方法的一些代码示例,展示了Query.isEverything的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.isEverything方法的具体详情如下:
包路径:org.h2.command.dml.Query
类名称:Query
方法名:isEverything

Query.isEverything介绍

[英]Visit all expressions and subqueries in this query using the visitor pattern.
[中]使用访问者模式访问此查询中的所有表达式和子查询。

代码示例

代码示例来源:origin: com.h2database/h2

  1. @Override
  2. public boolean isDeterministic() {
  3. if (allowRecursive || viewQuery == null) {
  4. return false;
  5. }
  6. return viewQuery.isEverything(ExpressionVisitor.DETERMINISTIC_VISITOR);
  7. }

代码示例来源:origin: com.h2database/h2

  1. @Override
  2. public boolean isEverything(ExpressionVisitor visitor) {
  3. return left.isEverything(visitor) && right.isEverything(visitor);
  4. }

代码示例来源:origin: com.h2database/h2

  1. @Override
  2. public boolean isEverything(ExpressionVisitor visitor) {
  3. return query.isEverything(visitor);
  4. }

代码示例来源:origin: com.h2database/h2

  1. @Override
  2. public boolean isEverything(ExpressionVisitor visitor) {
  3. return query.isEverything(visitor);
  4. }

代码示例来源:origin: com.h2database/h2

  1. @Override
  2. public boolean isEverything(ExpressionVisitor visitor) {
  3. return left.isEverything(visitor) && query.isEverything(visitor);
  4. }

代码示例来源:origin: com.h2database/h2

  1. public final long getMaxDataModificationId() {
  2. ExpressionVisitor visitor = ExpressionVisitor.getMaxModificationIdVisitor();
  3. isEverything(visitor);
  4. return visitor.getMaxDataModificationId();
  5. }
  6. }

代码示例来源:origin: com.h2database/h2

  1. @Override
  2. public boolean isQueryComparable() {
  3. if (!super.isQueryComparable()) {
  4. return false;
  5. }
  6. for (Table t : tables) {
  7. if (!t.isQueryComparable()) {
  8. return false;
  9. }
  10. }
  11. if (topQuery != null &&
  12. !topQuery.isEverything(ExpressionVisitor.QUERY_COMPARABLE_VISITOR)) {
  13. return false;
  14. }
  15. return true;
  16. }

代码示例来源:origin: com.h2database/h2

  1. /**
  2. * Check if the expression can be evaluated.
  3. *
  4. * @return true if it can be evaluated
  5. */
  6. public boolean isEvaluatable() {
  7. if (expression != null) {
  8. return expression
  9. .isEverything(ExpressionVisitor.EVALUATABLE_VISITOR);
  10. }
  11. if (expressionList != null) {
  12. for (Expression e : expressionList) {
  13. if (!e.isEverything(ExpressionVisitor.EVALUATABLE_VISITOR)) {
  14. return false;
  15. }
  16. }
  17. return true;
  18. }
  19. return expressionQuery
  20. .isEverything(ExpressionVisitor.EVALUATABLE_VISITOR);
  21. }

代码示例来源:origin: com.h2database/h2

  1. private boolean sameResultAsLast(Session s, Value[] params,
  2. Value[] lastParams, long lastEval) {
  3. if (!cacheableChecked) {
  4. long max = getMaxDataModificationId();
  5. noCache = max == Long.MAX_VALUE;
  6. cacheableChecked = true;
  7. }
  8. if (noCache) {
  9. return false;
  10. }
  11. Database db = s.getDatabase();
  12. for (int i = 0; i < params.length; i++) {
  13. Value a = lastParams[i], b = params[i];
  14. if (a.getType() != b.getType() || !db.areEqual(a, b)) {
  15. return false;
  16. }
  17. }
  18. if (!isEverything(ExpressionVisitor.DETERMINISTIC_VISITOR) ||
  19. !isEverything(ExpressionVisitor.INDEPENDENT_VISITOR)) {
  20. return false;
  21. }
  22. if (db.getModificationDataId() > lastEval &&
  23. getMaxDataModificationId() > lastEval) {
  24. return false;
  25. }
  26. return true;
  27. }

代码示例来源:origin: com.h2database/h2

  1. @Override
  2. public void createIndexConditions(Session session, TableFilter filter) {
  3. if (!session.getDatabase().getSettings().optimizeInList) {
  4. return;
  5. }
  6. if (!(left instanceof ExpressionColumn)) {
  7. return;
  8. }
  9. ExpressionColumn l = (ExpressionColumn) left;
  10. if (filter != l.getTableFilter()) {
  11. return;
  12. }
  13. ExpressionVisitor visitor = ExpressionVisitor.getNotFromResolverVisitor(filter);
  14. if (!query.isEverything(visitor)) {
  15. return;
  16. }
  17. filter.addIndexCondition(IndexCondition.getInQuery(l, query));
  18. }

代码示例来源:origin: com.h2database/h2

  1. if (isEverything(ExpressionVisitor.DETERMINISTIC_VISITOR)) {
  2. if (lastResult != null && !lastResult.isClosed() &&
  3. limit == lastLimit) {

代码示例来源:origin: org.wowtools/h2

  1. @Override
  2. public boolean isDeterministic() {
  3. if (recursive || viewQuery == null) {
  4. return false;
  5. }
  6. return viewQuery.isEverything(ExpressionVisitor.DETERMINISTIC_VISITOR);
  7. }

代码示例来源:origin: org.wowtools/h2

  1. @Override
  2. public boolean isEverything(ExpressionVisitor visitor) {
  3. return left.isEverything(visitor) && right.isEverything(visitor);
  4. }

代码示例来源:origin: com.eventsourcing/h2

  1. @Override
  2. public boolean isEverything(ExpressionVisitor visitor) {
  3. return query.isEverything(visitor);
  4. }

代码示例来源:origin: org.wowtools/h2

  1. @Override
  2. public boolean isEverything(ExpressionVisitor visitor) {
  3. return query.isEverything(visitor);
  4. }

代码示例来源:origin: org.wowtools/h2

  1. @Override
  2. public boolean isEverything(ExpressionVisitor visitor) {
  3. return query.isEverything(visitor);
  4. }

代码示例来源:origin: com.eventsourcing/h2

  1. @Override
  2. public boolean isEverything(ExpressionVisitor visitor) {
  3. return query.isEverything(visitor);
  4. }

代码示例来源:origin: com.eventsourcing/h2

  1. @Override
  2. public boolean isEverything(ExpressionVisitor visitor) {
  3. return left.isEverything(visitor) && query.isEverything(visitor);
  4. }

代码示例来源:origin: org.wowtools/h2

  1. public final long getMaxDataModificationId() {
  2. ExpressionVisitor visitor = ExpressionVisitor.getMaxModificationIdVisitor();
  3. isEverything(visitor);
  4. return visitor.getMaxDataModificationId();
  5. }

代码示例来源:origin: com.h2database/com.springsource.org.h2

  1. public final long getMaxDataModificationId() {
  2. ExpressionVisitor visitor = ExpressionVisitor.get(ExpressionVisitor.SET_MAX_DATA_MODIFICATION_ID);
  3. isEverything(visitor);
  4. return visitor.getMaxDataModificationId();
  5. }

相关文章