minimum method

  1. @override
Future<int?> minimum(
  1. String column
)
override

minimum gets minimum value of a num column in table

Implementation

@override
Future<int?> minimum(String column) async {
  final builder = _copyQueryWith(columns: ['MIN($column)']);

  final completer = Completer<List<Map<String, dynamic>>>()
    ..complete(database!.rawQuery(builder.sql, builder.arguments));

  if (isLogger!) Logger.query(type, completer.future, builder);
  final result = await completer.future;

  return result.firstOrNull?.values.firstOrNull as int?;
}