isNotNull method

QueryExpressionJunction<T, InstanceType> isNotNull()

Adds a 'not null check' expression to a query.

A query will only return objects where the selected property is not null.

This method can be applied to any property type.

Example:

  var q = new Query<Employee>()
    ..where((e) => e.manager).isNotNull();

Implementation

QueryExpressionJunction<T, InstanceType> isNotNull() {
  expression = const NullCheckExpression(shouldBeNull: false);

  return _createJunction();
}