ReplaceOneStatement constructor

ReplaceOneStatement(
  1. Map<String, dynamic> q,
  2. Map<String, dynamic> u, {
  3. bool? upsert,
  4. CollationOptions? collation,
  5. String? hint,
  6. Map<String, Object>? hintDocument,
})

Implementation

ReplaceOneStatement(Map<String, dynamic> q, Map<String, dynamic> u,
    {bool? upsert,
    CollationOptions? collation,
    String? hint,
    Map<String, Object>? hintDocument})
    : super(q, u,
          upsert: upsert,
          multi: false,
          collation: collation,
          hint: hint,
          hintDocument: hintDocument) {
  if (!isPureDocument(u)) {
    throw MongoDartError('Invalid document in ReplaceOneStatement. '
        'The document is either null or contains update operators');
  }
}