Tabnine Logo
Expression.isEverything
Code IndexAdd Tabnine to your IDE (free)

How to use
isEverything
method
in
org.h2.expression.Expression

Best Java code snippets using org.h2.expression.Expression.isEverything (Showing top 20 results out of 315)

origin: com.h2database/h2

@Override
public boolean isEverything(ExpressionVisitor visitor) {
  for (Expression e : list) {
    if (!e.isEverything(visitor)) {
      return false;
    }
  }
  return true;
}
origin: com.h2database/h2

@Override
public boolean isEverything(ExpressionVisitor visitor) {
  return left.isEverything(visitor) &&
      (right == null || right.isEverything(visitor));
}
origin: com.h2database/h2

private boolean areAllValues(ExpressionVisitor visitor) {
  for (Expression e : valueList) {
    if (!e.isEverything(visitor)) {
      return false;
    }
  }
  return true;
}
origin: com.h2database/h2

@Override
public boolean isEverything(ExpressionVisitor visitor) {
  return left.isEverything(visitor) && right.isEverything(visitor)
      && (escape == null || escape.isEverything(visitor));
}
origin: com.h2database/h2

@Override
public boolean isReadOnly() {
  return expression.isEverything(ExpressionVisitor.READONLY_VISITOR);
}
origin: com.h2database/h2

@Override
public boolean isEverything(ExpressionVisitor visitor) {
  return expr.isEverything(visitor);
}
origin: com.h2database/h2

@Override
public boolean isEverything(ExpressionVisitor visitor) {
  return expr.isEverything(visitor);
}
origin: com.h2database/h2

@Override
public boolean isEverything(ExpressionVisitor visitor) {
  return left.isEverything(visitor) &&
      (right == null || right.isEverything(visitor));
}
origin: com.h2database/h2

@Override
public boolean isEverything(ExpressionVisitor visitor) {
  return condition.isEverything(visitor);
}
origin: com.h2database/h2

@Override
public boolean isEverything(ExpressionVisitor visitor) {
  return left.isEverything(visitor) && right.isEverything(visitor);
}
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

@Override
public boolean isEverything(ExpressionVisitor visitor) {
  if (!left.isEverything(visitor)) {
    return false;
  }
  return areAllValues(visitor);
}
origin: com.h2database/h2

@Override
public boolean isEverything(ExpressionVisitor visitor) {
  return left.isEverything(visitor) && parameter.isEverything(visitor);
}
origin: com.h2database/h2

/**
 * Add conditions to a table filter if they can be evaluated.
 *
 * @param filter the table filter
 * @param outerJoin if the expression is part of an outer join
 */
public void addFilterConditions(TableFilter filter, boolean outerJoin) {
  if (!addedToFilter && !outerJoin &&
      isEverything(ExpressionVisitor.EVALUATABLE_VISITOR)) {
    filter.addFilterCondition(this, false);
    addedToFilter = true;
  }
}
origin: com.h2database/h2

@Override
public boolean isEverything(ExpressionVisitor visitor) {
  return left.isEverything(visitor) && query.isEverything(visitor);
}
origin: com.h2database/h2

@Override
public HashSet<Column> getReferencedColumns(Table table) {
  HashSet<Column> columns = new HashSet<>();
  expr.isEverything(ExpressionVisitor.getColumnsVisitor(columns));
  for (Iterator<Column> it = columns.iterator(); it.hasNext();) {
    if (it.next().getTable() != table) {
      it.remove();
    }
  }
  return columns;
}
origin: com.h2database/h2

@Override
public boolean isEverything(ExpressionVisitor visitor) {
  switch (visitor.getType()) {
  case ExpressionVisitor.DETERMINISTIC:
    // TODO optimization: some functions are deterministic, but we don't
    // know (no setting for that)
  case ExpressionVisitor.OPTIMIZABLE_MIN_MAX_COUNT_ALL:
    // user defined aggregate functions can not be optimized
    return false;
  case ExpressionVisitor.GET_DEPENDENCIES:
    visitor.addDependency(userAggregate);
    break;
  default:
  }
  for (Expression e : args) {
    if (e != null && !e.isEverything(visitor)) {
      return false;
    }
  }
  return filterCondition == null || filterCondition.isEverything(visitor);
}
origin: com.h2database/h2

private static void checkDefaultReferencesTable(Table table, Expression defaultExpression) {
  if (defaultExpression == null) {
    return;
  }
  HashSet<DbObject> dependencies = new HashSet<>();
  ExpressionVisitor visitor = ExpressionVisitor
      .getDependenciesVisitor(dependencies);
  defaultExpression.isEverything(visitor);
  if (dependencies.contains(table)) {
    throw DbException.get(ErrorCode.COLUMN_IS_REFERENCED_1,
        defaultExpression.getSQL());
  }
}
origin: com.h2database/h2

private HashSet<Column> buildColumnListFromOnCondition(
    TableFilter anyTableFilter) {
  HashSet<Column> filteredColumns = new HashSet<>();
  HashSet<Column> columns = new HashSet<>();
  ExpressionVisitor visitor = ExpressionVisitor
      .getColumnsVisitor(columns);
  onCondition.isEverything(visitor);
  for (Column c : columns) {
    if (c != null && c.getTable() == anyTableFilter.getTable()) {
      filteredColumns.add(c);
    }
  }
  return filteredColumns;
}
origin: com.h2database/h2

@Override
public void createIndexConditions(Session session, TableFilter filter) {
  if (!(left instanceof ExpressionColumn)) {
    return;
  }
  ExpressionColumn l = (ExpressionColumn) left;
  if (filter != l.getTableFilter()) {
    return;
  }
  if (session.getDatabase().getSettings().optimizeInList) {
    ExpressionVisitor visitor = ExpressionVisitor.getNotFromResolverVisitor(filter);
    for (Expression e : valueList) {
      if (!e.isEverything(visitor)) {
        return;
      }
    }
    filter.addIndexCondition(IndexCondition.getInList(l, valueList));
  }
}
org.h2.expressionExpressionisEverything

Javadoc

Check if this expression and all sub-expressions can fulfill a criteria. This is a convenience function.

Popular methods of Expression

  • getAlias
    Get the alias name of a column or SQL expression if it is not an aliased expression.
  • getDisplaySize
    Get the display size of this expression.
  • getNonAliasExpression
    Returns the main expression, skipping aliases.
  • getNotIfPossible
    If it is possible, return the negated expression. This is used to optimize NOT expressions: NOT ID>1
  • getPrecision
    Get the precision of this expression.
  • getScale
    Get the scale of this expression.
  • getType
    Return the data type. The data type may not be known before the optimization phase.
  • getValue
    Return the resulting value for the current row.
  • isConstant
    Check if this expression will always return the same value.
  • addFilterConditions
    Add conditions to a table filter if they can be evaluated.
  • createIndexConditions
    Create index conditions if possible and attach them to the table filter.
  • getBooleanValue
    Get the value in form of a boolean expression. Returns true or false. In this database, everything c
  • createIndexConditions,
  • getBooleanValue,
  • getColumnName,
  • getCost,
  • getNullable,
  • getSQL,
  • getSchemaName,
  • getTableAlias,
  • getTableName,
  • isAutoIncrement

Popular in Java

  • Making http post requests using okhttp
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getExternalFilesDir (Context)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • String (java.lang)
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now