max method

Expression<DateTime> max({
  1. Expression<bool>? filter,
})

Return the maximum of all non-null values in this group.

If there are no non-null values in the group, returns null. 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.

Implementation

Expression<DateTime> max({Expression<bool>? filter}) {
  final maxTimestamp = unixepoch.max(filter: filter);
  return DateTimeExpressions.fromUnixEpoch(maxTimestamp);
}