DatabaseRequest constructor

DatabaseRequest({
  1. MongoQuery? query,
  2. Map<String, bool>? projection,
  3. Document? document,
  4. Iterable<Document>? documents,
})

Implementation

factory DatabaseRequest({
  MongoQuery? query,
  $core.Map<$core.String, $core.bool>? projection,
  Document? document,
  $core.Iterable<Document>? documents,
}) {
  final _result = create();
  if (query != null) {
    _result.query = query;
  }
  if (projection != null) {
    _result.projection.addAll(projection);
  }
  if (document != null) {
    _result.document = document;
  }
  if (documents != null) {
    _result.documents.addAll(documents);
  }
  return _result;
}