between method Null safety

QueryExpressionJunction<T, InstanceType> between(
  1. T lhs,
  2. T rhs

Adds a 'between two values' expression to a query.

A query will only return objects where the selected property is between than lhs and rhs.

This method can be used on int, String, double and DateTime types. For DateTime properties, this method selects rows where the assigned property is 'later than' lhs and 'earlier than' rhs. For String properties, rows are selected if the value is alphabetically 'after' lhs and 'before' rhs.


  var query = new Query<Employee>()
    ..where((e) => e.salary).between(80000, 100000);


QueryExpressionJunction<T, InstanceType> between(T lhs, T rhs) {
  expression = RangeExpression(lhs, rhs, within: true);

  return _createJunction();