between method
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
.
Example:
var query = new Query<Employee>()
..where((e) => e.salary).between(80000, 100000);
Implementation
QueryExpressionJunction<T, InstanceType> between(T lhs, T rhs) {
expression = RangeExpression(lhs, rhs);
return _createJunction();
}