Create condition of BETWEEN ... AND ... operator.

@param betweenRightValue right value of BETWEEN operator
@param column column
@return condition
769064
public static Optional<Condition> createBetweenCondition(final PredicateBetweenRightValue betweenRightValue, final Column column) {
        return betweenRightValue.getBetweenExpression() instanceof SimpleExpressionSegment && betweenRightValue.getAndExpression() instanceof SimpleExpressionSegment
                ? Optional.of(new Condition(column,
                ((SimpleExpressionSegment) betweenRightValue.getBetweenExpression()).getSQLExpression(), ((SimpleExpressionSegment) betweenRightValue.getAndExpression()).getSQLExpression()))
                : Optional.<Condition>absent();
    }
1135263
public function whereBetween($column, array $values, $boolean = 'and', $not = false)
	{
		$type = 'between';

		$this->wheres[] = compact('column', 'type', 'boolean', 'not');

		$this->bindings = array_merge($this->bindings, $values);

		return $this;
	}
546948
public static <T extends Comparable<T>> Matcher<T> between(T min, T max) {
        return allOf(greaterThan(min), lessThan(max));
    }
593642
public final <A extends Number & Comparable<?>> BooleanExpression between(@Nullable Expression<A> from, @Nullable Expression<A> to) {
        if (from == null) {
            if (to != null) {
                return Expressions.booleanOperation(Ops.LOE, mixin, to);
            } else {
                throw new IllegalArgumentException("Either from or to needs to be non-null");
            }
        } else if (to == null) {
            return Expressions.booleanOperation(Ops.GOE, mixin, from);
        } else {
            return Expressions.booleanOperation(Ops.BETWEEN, mixin, from, to);
        }
    }
526528
public function between($column, $value1, $value2, $logicalAnd = true) {
        $this->customWhere('`:TBL:`.`' . Util::camelTo_($column) . '` BETWEEN "'
                . $value1 . '" AND "' . $value2 . '" ',
                $logicalAnd ? 'AND' : 'OR');
    }
561556
public function between($column, $left, $right, $conjunction = 'AND')
    {
        return $this->addExpression(new Condition\Between($column, $left, $right, $conjunction));
    }
971625
public Criteria between(@Nullable Object lowerBound, @Nullable Object upperBound, boolean includeLowerBound, boolean includeUppderBound) {
		predicates.add(new Predicate(OperationKey.BETWEEN,
				new Object[] { lowerBound, upperBound, includeLowerBound, includeUppderBound }));
		return this;
	}
389296
public static Between betweenExclusiveMax( String property, int minimum, int maximum)
    {
    return new Between( notLessThan( property, minimum), lessThan( property, maximum));
    }
817817
public Expression<Calendar> between(Calendar startValue, Calendar endValue) {
		String valueString = "'" + getCalendarAsString(startValue).concat("Z") + "' AND '" + getCalendarAsString(endValue) + "'";
		return new Expression<Calendar>(this, Operation.between, valueString);
	}
1066012
public int count(String column, Object value) {
        return count(Operators.match(column, value));
    }
224853
function where(column, operator, value) {

    // Support "where true || where false"
    if (column === false || column === true) {
      return this.where(1, '=', column ? 1 : 0);
    }

    // Check if the column is a function, in which case it's
    // a where statement wrapped in parens.
    if (typeof column === 'function') {
      return this.whereWrapped(column);
    }

    // Allow a raw statement to be passed along to the query.
    if (column instanceof Raw && arguments.length === 1) {
      return this.whereRaw(column);
    }

    // Allows `where({id: 2})` syntax.
    if (typeof column === 'object' && !(column instanceof Raw)) {
      return this._objectWhere(column);
    }

    // Enable the where('key', value) syntax, only when there
    // are explicitly two arguments passed, so it's not possible to
    // do where('key', '!=') and have that turn into where key != null
    if (arguments.length === 2) {
      value = operator;
      operator = '=';

      // If the value is null, and it's a two argument query,
      // we assume we're going for a `whereNull`.
      if (value === null) {
        return this.whereNull(column);
      }
    }

    // lower case the operator for comparison purposes
    var checkOperator = ('' + operator).toLowerCase().trim();

    // If there are 3 arguments, check whether 'in' is one of them.
    if (arguments.length === 3) {
      if (checkOperator === 'in' || checkOperator === 'not in') {
        return this._not(checkOperator === 'not in').whereIn(arguments[0], arguments[2]);
      }
      if (checkOperator === 'between' || checkOperator === 'not between') {
        return this._not(checkOperator === 'not between').whereBetween(arguments[0], arguments[2]);
      }
    }

    // If the value is still null, check whether they're meaning
    // where value is null
    if (value === null) {

      // Check for .where(key, 'is', null) or .where(key, 'is not', 'null');
      if (checkOperator === 'is' || checkOperator === 'is not') {
        return this._not(checkOperator === 'is not').whereNull(column);
      }
    }

    // Push onto the where statement stack.
    this._statements.push({
      grouping: 'where',
      type: 'whereBasic',
      column: column,
      operator: operator,
      value: value,
      not: this._not(),
      bool: this._bool()
    });
    return this;
  }
761560
public function orBetween($column, $left, $right)
    {
        $this->conditions[] = 'OR ' . $this->grammar->buildId($column) . ' BETWEEN ' . $left . ' AND ' . $right;

        return $this;
    }
771474
private FieldConstraint makeSingleFieldConstraint(ConditionCol52 c,
                                                      String cell) {

        SingleFieldConstraint sfc = new SingleFieldConstraint(c.getFactField());

        //Condition columns can be defined as having no operator, in which case the operator
        //is taken from the cell's value. Pretty yucky really if we're to be able to perform
        //expansion and contraction of decision table columns.... this might have to go.
        if (no(c.getOperator())) {

            String[] a = cell.split("\\s");
            if (a.length > 1) {
                //Operator might be 1 part (e.g. "==") or two parts (e.g. "not in")
                StringBuilder operator = new StringBuilder(a[0]);
                for (int i = 1; i < a.length - 1; i++) {
                    operator.append(a[i]);
                }
                sfc.setOperator(operator.toString());
                sfc.setValue(a[a.length - 1]);
            } else {
                sfc.setValue(cell);
            }
        } else {

            sfc.setOperator(c.getOperator());
            if (OperatorsOracle.operatorRequiresList(c.getOperator())) {
                sfc.setValue(makeInList(cell));
            } else {
                if (!c.getOperator().equals("== null") && !c.getOperator().equals("!= null")) {
                    sfc.setValue(cell);
                }
            }
        }
        final int constraintValueType = c.getConstraintValueType();
        if ((constraintValueType == BaseSingleFieldConstraint.TYPE_LITERAL || constraintValueType == BaseSingleFieldConstraint.TYPE_RET_VALUE) && c.isBound()) {
            sfc.setFieldBinding(c.getBinding());
        }
        sfc.setParameters(c.getParameters());
        sfc.setConstraintValueType(c.getConstraintValueType());
        sfc.setFieldType(c.getFieldType());
        return sfc;
    }
1363388
public static Between between( String property, int minimum, int maximum)
    {
    return new Between( notLessThan( property, minimum), notMoreThan( property, maximum));
    }
911984
public function orWhereBetween($column, $a, $b, $filter = false)
    {
        return $this->between(__FUNCTION__, $column, $a, $b, $filter);
    }
295365
public static IsGreaterThanOrEqual isGreaterThanOrEqual(ComparableExpression<Number> left, ComparableExpression<Number> right) {
        return new IsGreaterThanOrEqual(left, right);
    }
518322
public org.grails.datastore.mapping.query.api.Criteria between(String propertyName, Object lo, Object hi) {
        if (!validateSimpleExpression()) {
            throwRuntimeException(new IllegalArgumentException("Call to [between] with propertyName [" +
                    propertyName + "]  not allowed here."));
        }

        propertyName = calculatePropertyName(propertyName);
        addToCriteria(Restrictions.between(propertyName, lo, hi));
        return this;
    }