Skip to content

Commit 799e91c

Browse files
Nima Boscarinorstam
authored andcommitted
Fix typo in filter creation for "Deleting Documents"
Remove an extra ")" in the commands to create filters for DeleteOne and DeleteMany, which causes syntax errors.
1 parent f2c0947 commit 799e91c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Docs/reference/content/getting_started/quick_tour.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ The update methods return an [`UpdateResult`]({{< apiref "T_MongoDB_Driver_Updat
341341
To delete at most 1 document (may be 0 if none match the filter) use the [`DeleteOne`]({{< apiref "M_MongoDB_Driver_IMongoCollection_1_DeleteOne" >}}) or [`DeleteOneAsync`]({{< apiref "M_MongoDB_Driver_IMongoCollection_1_DeleteOneAsync" >}}) methods:
342342

343343
```csharp
344-
var filter = Builders<BsonDocument>.Filter.Eq("i", 110));
344+
var filter = Builders<BsonDocument>.Filter.Eq("i", 110);
345345
```
346346
```csharp
347347
collection.DeleteOne(filter);
@@ -353,7 +353,7 @@ await collection.DeleteOneAsync(filter);
353353
To delete all documents matching the filter use the [`DeleteMany`]({{< apiref "M_MongoDB_Driver_IMongoCollection_1_DeleteMany" >}}) or [`DeleteManyAsync`]({{< apiref "M_MongoDB_Driver_IMongoCollection_1_DeleteManyAsync" >}}) methods. Here we delete all documents where `i >= 100`:
354354

355355
```csharp
356-
var filter = Builders<BsonDocument>.Filter.Gte("i", 100));
356+
var filter = Builders<BsonDocument>.Filter.Gte("i", 100);
357357
```
358358
```csharp
359359
var result = collection.DeleteMany(filter);
@@ -414,4 +414,4 @@ await collection.BulkWriteAsync(models);
414414
await collection.BulkWriteAsync(models, new BulkWriteOptions { IsOrdered = false });
415415
```
416416

417-
{{% note class="important" %}}Use of the bulkWrite methods is not recommended when connected to pre-2.6 MongoDB servers, as this was the first server version to support bulk write commands for insert, update, and delete in a way that allows the driver to implement the correct semantics for BulkWriteResult and BulkWriteException. The methods will still work for pre-2.6 servers, but performance will suffer, as each write operation has to be executed one at a time.{{% /note %}}
417+
{{% note class="important" %}}Use of the bulkWrite methods is not recommended when connected to pre-2.6 MongoDB servers, as this was the first server version to support bulk write commands for insert, update, and delete in a way that allows the driver to implement the correct semantics for BulkWriteResult and BulkWriteException. The methods will still work for pre-2.6 servers, but performance will suffer, as each write operation has to be executed one at a time.{{% /note %}}

0 commit comments

Comments
 (0)