withMax<TChild, V> method
MssqlProjectedQuery<(TRow, V?)>
withMax<TChild, V>(
- MssqlRelation<
TRow, TChild> relation(- TFields fields
- MssqlExpression operand
Parent rows plus MAX of operand on matching children.
MAX keeps the operand's SQL type exactly, so V is the operand
column's own Dart type. See withSum on why it is unbounded.
Implementation
MssqlProjectedQuery<(TRow, V?)> withMax<TChild, V>(
MssqlRelation<TRow, TChild> Function(TFields fields) relation,
MssqlExpression operand,
) {
return _withAggregate(
relation,
MssqlAggregate.max(operand),
(v) => _decodeAggregate<V>('withMax', v),
);
}