listIndexes method

Stream<Map<String, dynamic>> listIndexes({
  1. int? batchSize,
  2. String? comment,
  3. Map<String, Object>? rawOptions,
})

Implementation

Stream<Map<String, dynamic>> listIndexes(
    {int? batchSize, String? comment, Map<String, Object>? rawOptions}) {
  if (!db.masterConnection.serverCapabilities.supportsOpMsg) {
    throw MongoDartError('listIndexes method cannot be used before 3.6');
  }

  var indexOptions =
      ListIndexesOptions(batchSize: batchSize, comment: comment);

  var command = ListIndexesCommand(db, this,
      listIndexesOptions: indexOptions, rawOptions: rawOptions);

  return ModernCursor(command).stream;
}