TBD expr public IDocumentQuery<T> WhereGreaterThanOrEqual<TValue>(Expression<Func<T, TValue>> propertySelector, TValue value, bool exact = false)
167136
public IDocumentQuery<T> whereLessThan(String fieldName, Object value) {
        return whereLessThan(fieldName, value, false);
    }
119479
public static BooleanExpression asBoolean(Expression<Boolean> expr) {
        Expression<Boolean> underlyingMixin = ExpressionUtils.extract(expr);
        if (underlyingMixin instanceof PathImpl) {
            return new BooleanPath((PathImpl<Boolean>) underlyingMixin);
        } else if (underlyingMixin instanceof PredicateOperation) {
            return new BooleanOperation((PredicateOperation) underlyingMixin);
        } else if (underlyingMixin instanceof PredicateTemplate) {
            return new BooleanTemplate((PredicateTemplate) underlyingMixin);
        } else {
            return new BooleanExpression(underlyingMixin) {

                private static final long serialVersionUID = -8712299418891960222L;

                @Override
                public <R, C> R accept(Visitor<R, C> v, C context) {
                    return this.mixin.accept(v, context);
                }

            };
        }
    }
89088
@SuppressWarnings("unchecked")
    public static <T> Expression<T> extract(Expression<T> expr) {
        if (expr != null) {
            final Class<?> clazz = expr.getClass();
            if (clazz == PathImpl.class || clazz == PredicateOperation.class || clazz == ConstantImpl.class) {
                return expr;
            } else {
                return (Expression<T>) expr.accept(ExtractorVisitor.DEFAULT, null);
            }
        } else {
            return null;
        }
    }
623397
function (expr, cb, joinCond) {
            expr = (isUndefined(expr) || isNull(expr) || (Array.isArray(expr) && !expr.length)) ? null : expr;
            if (expr && cb) {
                return new BooleanExpression(joinCond || "AND", this._filterExpr(expr, null, joinCond), this._filterExpr(cb, null, joinCond));
            } else if (cb) {
                expr = cb;
            }
            if (isInstanceOf(expr, Expression)) {
                if (isInstanceOf(expr, NumericExpression, StringExpression)) {
                    throw new QueryError("Invalid SQL Expression type : " + expr);
                }
                return expr;
            } else if (Array.isArray(expr)) {
                if (expr.length) {
                    var first = expr[0];
                    if (isString(first)) {
                        return new PlaceHolderLiteralString(first, expr.slice(1), true);
                    } else if (Expression.isConditionSpecifier(expr)) {
                        return BooleanExpression.fromValuePairs(expr, joinCond);
                    } else {
                        return BooleanExpression.fromArgs([joinCond || "AND"].concat(expr.map(function (e) {
                            return this._filterExpr(e, null, "AND");
                        }, this)));
                    }
                }
            } else if (isFunction(expr)) {
                return this._filterExpr(expr.call(sql, sql), null, joinCond);
            } else if (isBoolean(expr)) {
                return new BooleanExpression("NOOP", expr);
            } else if (isString(expr)) {
                return this.stringToIdentifier(expr);
            } else if (isInstanceOf(expr, LiteralString)) {
                return new LiteralString("(" + expr + ")");
            } else if (isHash(expr)) {
                return BooleanExpression.fromValuePairs(expr, joinCond);
            } else {
                throw new QueryError("Invalid filter argument");
            }
        }
1132303
public static Matcher<ExpressionTree> sameVariable(final ExpressionTree expr) {
    return new Matcher<ExpressionTree>() {
      @Override
      public boolean matches(ExpressionTree tree, VisitorState state) {
        return ASTHelpers.sameVariable(tree, expr);
      }
    };
  }
836027
static BaseDoubleColumnValueSelector makeColumnValueSelectorWithDoubleDefault(
      final ColumnSelectorFactory metricFactory,
      final ExprMacroTable macroTable,
      @Nullable final String fieldName,
      @Nullable final String fieldExpression,
      final double nullValue
  )
  {
    if ((fieldName == null) == (fieldExpression == null)) {
      throw new IllegalArgumentException("");
    }
    if (fieldName != null) {
      return metricFactory.makeColumnValueSelector(fieldName);
    } else {
      final Expr expr = Parser.parse(fieldExpression, macroTable);
      final ColumnValueSelector<ExprEval> baseSelector = ExpressionSelectors.makeExprEvalSelector(metricFactory, expr);
      class ExpressionDoubleColumnSelector implements DoubleColumnSelector
      {
        @Override
        public double getDouble()
        {
          final ExprEval exprEval = baseSelector.getObject();
          return exprEval.isNumericNull() ? nullValue : exprEval.asDouble();
        }

        @Override
        public void inspectRuntimeShape(RuntimeShapeInspector inspector)
        {
          inspector.visit("baseSelector", baseSelector);
        }

        @Override
        public boolean isNull()
        {
          final ExprEval exprEval = baseSelector.getObject();
          return exprEval == null || exprEval.isNumericNull();
        }
      }
      return new ExpressionDoubleColumnSelector();
    }
  }
808790
public static boolean isFalse(Expression expression) {
        if (expression == null) {
            return false;
        }
        if (expression instanceof PropertyExpression && classNodeImplementsType(((PropertyExpression) expression).getObjectExpression().getType(), Boolean.class)) {
            if (((PropertyExpression) expression).getProperty() instanceof ConstantExpression
                    && "FALSE".equals(((ConstantExpression) ((PropertyExpression) expression).getProperty()).getValue())) {
                return true;
            }
        }
        return ((expression instanceof ConstantExpression) && ((ConstantExpression) expression).isFalseExpression())
                || "Boolean.FALSE".equals(expression.getText());
    }
40614
Expression XreadAllTypesValueExpressionPrimary(boolean boole) {

        Expression e = null;

        switch (token.tokenType) {

            case Tokens.EXISTS :
            case Tokens.UNIQUE :
                if (boole) {
                    return XreadPredicate();
                }
                break;

            case Tokens.ROW :
                if (boole) {
                    break;
                }

                read();
                readThis(Tokens.OPENBRACKET);

                e = XreadRowElementList(true);

                readThis(Tokens.CLOSEBRACKET);
                break;

            default :
                e = XreadSimpleValueExpressionPrimary();
        }

        if (e == null && token.tokenType == Tokens.OPENBRACKET) {
            read();

            e = XreadRowElementList(true);

            readThis(Tokens.CLOSEBRACKET);
        }

        if (boole && e != null) {
            e = XreadPredicateRightPart(e);
        }

        return e;
    }
478347
public <T> JDOQuery<T> selectDistinct(Expression<T> expr) {
        return query().select(expr).distinct();
    }
138455
private AbstractExpression parseTableCondition(VoltXMLElement tableScan,
            String joinOrWhere) {
        AbstractExpression condExpr = null;
        for (VoltXMLElement childNode : tableScan.children) {
            if ( ! childNode.name.equalsIgnoreCase(joinOrWhere)) {
                continue;
            }
            assert(childNode.children.size() == 1);
            assert(condExpr == null);
            condExpr = parseConditionTree(childNode.children.get(0));
            assert(condExpr != null);
            ExpressionUtil.finalizeValueTypes(condExpr);
            condExpr = ExpressionUtil.evaluateExpression(condExpr);
            // If the condition is a trivial CVE(TRUE) (after the evaluation) simply drop it
            if (ConstantValueExpression.isBooleanTrue(condExpr)) {
                condExpr = null;
            }
        }
        return condExpr;
    }
22291
def visitEqualityExpression(self, ctx):
        
        arg1, arg2 = conversions.to_same(self.visit(ctx.expression(0)), self.visit(ctx.expression(1)), self._eval_context)

        if isinstance(arg1, str):
            # string equality is case-insensitive
            equal = arg1.lower() == arg2.lower()
        else:
            equal = arg1 == arg2

        return equal if ctx.EQ() is not None else not equal
930289
private void parseAndBuildFilters(EntityType entityType, KuduScannerBuilder scannerBuilder, Expression whereExp)
    {
        if (whereExp instanceof ComparisonExpression)
        {
            String left = ((ComparisonExpression) whereExp).getLeftExpression().toActualText();

            String right = ((ComparisonExpression) whereExp).getRightExpression().toActualText();
            if (right.startsWith(POSITIONAL_PREFIX) || right.startsWith(PARAMETERIZED_PREFIX))
            {
                right = kunderaQuery.getParametersMap().get(right) + "";
            }
            Attribute attribute = entityType.getAttribute(left.split(DOT_REGEX)[1]);
            addColumnRangePredicateToBuilder((Field) attribute.getJavaMember(), scannerBuilder,
                    ((AbstractAttribute) attribute).getJPAColumnName(), right,
                    ((ComparisonExpression) whereExp).getActualIdentifier());
        }
        else if (whereExp instanceof AndExpression)
        {
            parseAndBuildFilters(entityType, scannerBuilder, ((AndExpression) whereExp).getLeftExpression());
            parseAndBuildFilters(entityType, scannerBuilder, ((AndExpression) whereExp).getRightExpression());
        }
        else if (whereExp instanceof InExpression)
        {

            ListIterator<Expression> inIter = ((InExpression) whereExp).getInItems().children().iterator();
            Attribute attribute = entityType.getAttribute(((InExpression) whereExp).getExpression().toActualText()
                    .split(DOT_REGEX)[1]);
            addInPredicateToBuilder(scannerBuilder, inIter, attribute);
        }

        else
        {
            logger.error("Operation not supported");
            throw new KunderaException("Operation not supported");
        }
    }
263773
public static <T> SQLQuery<T> select(Expression<T> expr) {
        return new SQLQuery<Void>().select(expr);
    }
1176314
public QueryExpression eq(String propertyName,String value)
    {
        return new SimpleQueryExpression(propertyName, ComparisonOperator.EQUAL,wrap(value));
    }
361720
StatementDMQL compileDeleteStatement(RangeVariable[] outerRanges) {

        Expression condition       = null;
        boolean    truncate        = false;
        boolean    restartIdentity = false;

        switch (token.tokenType) {

            case Tokens.TRUNCATE : {
                read();
                readThis(Tokens.TABLE);

                truncate = true;

                break;
            }
            case Tokens.DELETE : {
                read();
                readThis(Tokens.FROM);

                break;
            }
        }

        RangeVariable[] rangeVariables = {
            readSimpleRangeVariable(StatementTypes.DELETE_WHERE) };
        Table table     = rangeVariables[0].getTable();
        Table baseTable = table.getBaseTable();

        /* A VoltDB Extension.
         * Views from Streams are now updatable.
         * Comment out this guard and check if it is a view
         * from Stream or PersistentTable in planner.
        if (!table.isUpdatable()) {
            throw Error.error(ErrorCode.X_42000);
        }
        A VoltDB Extension */

        if (truncate) {
            switch (token.tokenType) {

                case Tokens.CONTINUE : {
                    read();
                    readThis(Tokens.IDENTITY);

                    break;
                }
                case Tokens.RESTART : {
                    read();
                    readThis(Tokens.IDENTITY);

                    restartIdentity = true;

                    break;
                }
            }

            for (int i = 0; i < table.constraintList.length; i++) {
                if (table.constraintList[i].getConstraintType()
                        == Constraint.MAIN) {
                    throw Error.error(ErrorCode.X_23501);
                }
            }
        }

        if (truncate && table != baseTable) {
            throw Error.error(ErrorCode.X_42000);
        }

        if (!truncate && token.tokenType == Tokens.WHERE) {
            read();

            condition = XreadBooleanValueExpression();

            HsqlList unresolved =
                condition.resolveColumnReferences(outerRanges, null);

            unresolved = Expression.resolveColumnSet(rangeVariables,
                    unresolved, null);

            ExpressionColumn.checkColumnsResolved(unresolved);
            condition.resolveTypes(session, null);

            if (condition.isParam()) {
                condition.dataType = Type.SQL_BOOLEAN;
            }

            if (condition.getDataType() != Type.SQL_BOOLEAN) {
                throw Error.error(ErrorCode.X_42568);
            }
        }

        // VoltDB Extension:
        // baseTable could be null for stream views.
        if (baseTable != null && table != baseTable) {
            QuerySpecification select =
                ((TableDerived) table).getQueryExpression().getMainSelect();

            if (condition != null) {
                condition =
                    condition.replaceColumnReferences(rangeVariables[0],
                                                      select.exprColumns);
            }

            rangeVariables[0] = new RangeVariable(select.rangeVariables[0]);
            condition = ExpressionLogical.andExpressions(select.queryCondition,
                    condition);
        }

        if (condition != null) {
            RangeVariableResolver resolver =
                new RangeVariableResolver(rangeVariables, condition,
                                          compileContext);

            resolver.processConditions();

            rangeVariables = resolver.rangeVariables;
        }

        // VoltDB Extension:
        // This needs to be done before building the compiled statement
        // so that parameters in LIMIT or OFFSET are retrieved from
        // the compileContext
        SortAndSlice sas = voltGetSortAndSliceForDelete(rangeVariables);

        StatementDMQL cs = new StatementDML(session, table, rangeVariables,
                                            compileContext, restartIdentity);

        // VoltDB Extension:
        voltAppendDeleteSortAndSlice((StatementDML)cs, sas);

        return cs;
    }
1078068
private static ConstantValueExpression asCVE(AbstractExpression expr) {
        return expr instanceof ConstantValueExpression ? (ConstantValueExpression) expr :
                ((ParameterValueExpression) expr).getOriginalValue();
    }
456762
function exactOrPrefix(query, node, info) {
  var value

  if (!has(node, info.property)) {
    return false
  }

  value = normalizeValue(node.properties[info.property], info)

  return Boolean(
    value === query.value ||
      (value.slice(0, query.value.length) === query.value &&
        value.charAt(query.value.length) === '-')
  )
}