congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
Expression.getNonAliasExpression
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: com.h2database/h2

/**
 * Get the column for the given table filter, if the sort column is for this
 * filter.
 *
 * @param index the column index (0, 1,..)
 * @param filter the table filter
 * @return the column, or null
 */
public Column getColumn(int index, TableFilter filter) {
  if (orderList == null) {
    return null;
  }
  SelectOrderBy order = orderList.get(index);
  Expression expr = order.expression;
  if (expr == null) {
    return null;
  }
  expr = expr.getNonAliasExpression();
  if (expr.isConstant()) {
    return null;
  }
  if (!(expr instanceof ExpressionColumn)) {
    return null;
  }
  ExpressionColumn exprCol = (ExpressionColumn) expr;
  if (exprCol.getTableFilter() != filter) {
    return null;
  }
  return exprCol.getColumn();
}
origin: com.h2database/h2

  continue;
Expression expr = expressions.get(i).getNonAliasExpression();
if (!(expr instanceof ExpressionColumn)) {
  return false;
origin: com.h2database/h2

for (int i = 0; i < visibleColumnCount; i++) {
  Expression expr = expressions.get(i);
  expr = expr.getNonAliasExpression();
  String sql = expr.getSQL();
  expressionSQL.add(sql);
origin: com.h2database/h2

Expression comp;
Expression col = expressions.get(columnId);
col = col.getNonAliasExpression();
if (col.isEverything(ExpressionVisitor.QUERY_COMPARABLE_VISITOR)) {
  comp = new Comparison(session, comparisonType, col, param);
origin: com.h2database/h2

SelectListColumnResolver(Select select) {
  this.select = select;
  int columnCount = select.getColumnCount();
  columns = new Column[columnCount];
  expressions = new Expression[columnCount];
  ArrayList<Expression> columnList = select.getExpressions();
  ColumnNamer columnNamer= new ColumnNamer(select.getSession());
  for (int i = 0; i < columnCount; i++) {
    Expression expr = columnList.get(i);
    String columnName = columnNamer.getColumnName(expr, i, expr.getAlias());
    Column column = new Column(columnName, Value.NULL);
    column.setTable(null, i);
    columns[i] = column;
    expressions[i] = expr.getNonAliasExpression();
  }
}
origin: apache/ignite

/**
 * @param qry Query.
 * @param expCol Expression column.
 * @param validate Query validation flag.
 * @return {@code true} It it is an affinity column.
 */
private static boolean isAffinityColumn(Query qry, ExpressionColumn expCol, boolean validate) {
  if (qry.isUnion()) {
    SelectUnion union = (SelectUnion)qry;
    return isAffinityColumn(union.getLeft(), expCol, validate) && isAffinityColumn(union.getRight(), expCol, validate);
  }
  Expression exp = qry.getExpressions().get(expCol.getColumn().getColumnId()).getNonAliasExpression();
  if (exp instanceof ExpressionColumn) {
    expCol = (ExpressionColumn)exp;
    return isAffinityColumn(expCol.getTableFilter(), expCol, validate);
  }
  return false;
}
origin: com.h2database/h2

      found = true;
    } else {
      Expression ec2 = ec.getNonAliasExpression();
      if (ec2 instanceof ExpressionColumn) {
        ExpressionColumn c2 = (ExpressionColumn) ec2;
o.expression = expressions.get(idx).getNonAliasExpression();
origin: com.h2database/h2

expr = expr.getNonAliasExpression();
if (expr.isConstant()) {
  continue;
origin: com.h2database/h2

  expressions.size() == 1 && condition == null) {
Expression expr = expressions.get(0);
expr = expr.getNonAliasExpression();
if (expr instanceof ExpressionColumn) {
  Column column = ((ExpressionColumn) expr).getColumn();
origin: com.h2database/h2

  fromColumn = (ExpressionColumn) expr;
} else if (expr instanceof Alias) {
  Expression aliasExpr = expr.getNonAliasExpression();
  if (aliasExpr instanceof ExpressionColumn) {
    fromColumn = (ExpressionColumn) aliasExpr;
origin: apache/ignite

exp = exp.getNonAliasExpression();
origin: apache/ignite

parseExpression(expression.getNonAliasExpression(), calcTypes), true);
origin: com.h2database/h2

for (int gi : groupIndex) {
  Expression g = exprList[gi];
  g = g.getNonAliasExpression();
  buff.appendExceptFirst(", ");
  buff.append(StringUtils.unEnclose(g.getSQL()));
origin: org.wowtools/h2

/**
 * Get the column for the given table filter, if the sort column is for this
 * filter.
 *
 * @param index the column index (0, 1,..)
 * @param filter the table filter
 * @return the column, or null
 */
public Column getColumn(int index, TableFilter filter) {
  if (orderList == null) {
    return null;
  }
  SelectOrderBy order = orderList.get(index);
  Expression expr = order.expression;
  if (expr == null) {
    return null;
  }
  expr = expr.getNonAliasExpression();
  if (expr.isConstant()) {
    return null;
  }
  if (!(expr instanceof ExpressionColumn)) {
    return null;
  }
  ExpressionColumn exprCol = (ExpressionColumn) expr;
  if (exprCol.getTableFilter() != filter) {
    return null;
  }
  return exprCol.getColumn();
}
origin: com.eventsourcing/h2

SelectListColumnResolver(Select select) {
  this.select = select;
  int columnCount = select.getColumnCount();
  columns = new Column[columnCount];
  expressions = new Expression[columnCount];
  ArrayList<Expression> columnList = select.getExpressions();
  for (int i = 0; i < columnCount; i++) {
    Expression expr = columnList.get(i);
    Column column = new Column(expr.getAlias(), Value.NULL);
    column.setTable(null, i);
    columns[i] = column;
    expressions[i] = expr.getNonAliasExpression();
  }
}
origin: com.eventsourcing/h2

/**
 * Get the column for the given table filter, if the sort column is for this
 * filter.
 *
 * @param index the column index (0, 1,..)
 * @param filter the table filter
 * @return the column, or null
 */
public Column getColumn(int index, TableFilter filter) {
  if (orderList == null) {
    return null;
  }
  SelectOrderBy order = orderList.get(index);
  Expression expr = order.expression;
  if (expr == null) {
    return null;
  }
  expr = expr.getNonAliasExpression();
  if (expr.isConstant()) {
    return null;
  }
  if (!(expr instanceof ExpressionColumn)) {
    return null;
  }
  ExpressionColumn exprCol = (ExpressionColumn) expr;
  if (exprCol.getTableFilter() != filter) {
    return null;
  }
  return exprCol.getColumn();
}
origin: org.wowtools/h2

SelectListColumnResolver(Select select) {
  this.select = select;
  int columnCount = select.getColumnCount();
  columns = new Column[columnCount];
  expressions = new Expression[columnCount];
  ArrayList<Expression> columnList = select.getExpressions();
  for (int i = 0; i < columnCount; i++) {
    Expression expr = columnList.get(i);
    Column column = new Column(expr.getAlias(), Value.NULL);
    column.setTable(null, i);
    columns[i] = column;
    expressions[i] = expr.getNonAliasExpression();
  }
}
origin: com.eventsourcing/h2

  continue;
Expression expr = expressions.get(i).getNonAliasExpression();
if (!(expr instanceof ExpressionColumn)) {
  return false;
origin: org.apache.ignite/ignite-indexing

/**
 * @param qry Query.
 * @param expCol Expression column.
 * @param validate Query validation flag.
 * @return {@code true} It it is an affinity column.
 */
private static boolean isAffinityColumn(Query qry, ExpressionColumn expCol, boolean validate) {
  if (qry.isUnion()) {
    SelectUnion union = (SelectUnion)qry;
    return isAffinityColumn(union.getLeft(), expCol, validate) && isAffinityColumn(union.getRight(), expCol, validate);
  }
  Expression exp = qry.getExpressions().get(expCol.getColumn().getColumnId()).getNonAliasExpression();
  if (exp instanceof ExpressionColumn) {
    expCol = (ExpressionColumn)exp;
    return isAffinityColumn(expCol.getTableFilter(), expCol, validate);
  }
  return false;
}
origin: com.h2database/com.springsource.org.h2

public void addGlobalCondition(Parameter param, int columnId, int comparisonType) throws SQLException {
  addParameter(param);
  Expression col = (Expression) expressions.get(columnId);
  col = col.getNonAliasExpression();
  Expression comp = new Comparison(session, comparisonType, col, param);
  comp = comp.optimize(session);
org.h2.expressionExpressiongetNonAliasExpression

Javadoc

Returns the main expression, skipping aliases.

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.
  • 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
  • getColumnName
    Get the column name or alias name of this expression.
  • getBooleanValue,
  • getColumnName,
  • getCost,
  • getNullable,
  • getSQL,
  • getSchemaName,
  • getTableAlias,
  • getTableName,
  • isAutoIncrement

Popular in Java

  • Reactive rest calls using spring rest template
  • setRequestProperty (URLConnection)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • startActivity (Activity)
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • Path (java.nio.file)
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • DataSource (javax.sql)
    An interface for the creation of Connection objects which represent a connection to a database. This
  • PhpStorm for WordPress
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