doCount method

  1. @override
FutureOr<int> doCount(
  1. TransactionOperation op,
  2. String entityName,
  3. String table, {
  4. EntityMatcher? matcher,
  5. Object? parameters,
  6. List? positionalParameters,
  7. Map<String, Object?>? namedParameters,
  8. PreFinishDBOperation<int, int>? preFinish,
})
override

Implementation

@override
FutureOr<int> doCount(
    TransactionOperation op, String entityName, String table,
    {EntityMatcher? matcher,
    Object? parameters,
    List? positionalParameters,
    Map<String, Object?>? namedParameters,
    PreFinishDBOperation<int, int>? preFinish}) {
  return generateCountSQL(op.transaction, entityName, table,
          matcher: matcher,
          parameters: parameters,
          positionalParameters: positionalParameters,
          namedParameters: namedParameters)
      .resolveMapped((sql) {
    return countSQL(op, entityName, table, sql)
        .resolveMapped((r) => _finishSQLOperation(sql, op, r, preFinish));
  });
}