max method

Future<DbResponse> max(
  1. List<Max> max,
  2. {Where? where}
)
  max([Max("amount", label: "maxAmount")]);
  max([Max("amount", label: "maxAmount"), Min("age", label: "maxAge"),], where: Where("age",WhereOperator.isGreaterThan , 40));

Implementation

Future<DbResponse> max(
  List<Max> max, {
  Where? where,
}) async {
  String query =
      'SELECT ${(max.map((e) => e.query)).join(", ")} FROM "$tableName" ${getQuery(where: where)}';
  var dbRes = await db.query(query);

  return DbResponse(
      dbRes.columnDescriptions.map((e) => e.columnName).toList(),
      List<List>.from(dbRes.toList()));
}