count method

Future<int> count({
  1. required String database,
  2. required String table,
  3. Object? where,
  4. Object? params,
  5. List<String>? namespace,
})

Implementation

Future<int> count({required String database, required String table, Object? where, Object? params, List<String>? namespace}) async {
  final response = await _invoke("count", {
    "database": database,
    "table": table,
    "where": _whereClause(where),
    "params": params,
    "namespace": namespace,
  });
  if (response is! JsonContent || response.json["count"] is! num) {
    throw _unexpectedResponseError("count");
  }
  return (response.json["count"] as num).toInt();
}