getOptions method

Map<String, Object> getOptions(
  1. Db? db
)

Implementation

Map<String, Object> getOptions(Db? db) => <String, Object>{
      if (allowDiskUse) keyAllowDiskUse: allowDiskUse,
      if (maxTimeMS != null) keyMaxTimeMS: maxTimeMS!,
      if (bypassDocumentValidation)
        keyBypassDocumentValidation: bypassDocumentValidation,
      if (readConcern != null) keyReadConcern: readConcern!.toMap(),
      if (collation != null) keyCollation: collation!.options,
      if (comment != null) keyComment: comment!,
      if (writeConcern != null && db?.masterConnection.serverStatus != null)
        keyWriteConcern:
            writeConcern!.asMap(db!.masterConnection.serverStatus),
    };