outsideOf method Null safety

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

Adds a 'outside of the range crated by two values' expression to a query.

A query will only return objects where the selected property is not within the range established by lhs to 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' rhs and 'earlier than' lhs. For String properties, rows are selected if the value is alphabetically 'before' lhs and 'after' rhs.

Example:

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

Implementation

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

  return _createJunction();
}