countAll function Null safety

Expression<int> countAll(
  1. {Expression<bool?>? filter}
)

Returns the amount of rows in the current group matching the optional filter.

To only consider rows matching a predicate, you can set the optional filter. Note that filter is only available from sqlite 3.30, released on 2019-10-04. Most devices will use an older sqlite version.

This is equivalent to the COUNT(*) FILTER (WHERE filter) sql function. The filter will be omitted if null.

Implementation

Expression<int> countAll({Expression<bool?>? filter}) {
  return _AggregateExpression('COUNT', const _StarFunctionParameter(),
      filter: filter);
}