execute method

  1. @override
Future<Map<String, dynamic>> execute({
  1. bool skipStateCheck = false,
})

Implementation

@override
Future<Map<String, dynamic>> execute({bool skipStateCheck = false}) async {
  final db = this.db;

  var command = $buildCommand();
  processOptions(command);
  command.addAll(options);

  var message = MongoModernMessage(command);

  connection ??= db.masterConnectionAnyState;

  var response = await connection!.executeModernMessage(message);

  var section = response.sections.firstWhere((Section section) =>
      section.payloadType == MongoModernMessage.basePayloadType);
  return section.payload.content;
}