Skip to content

Commit 2c35024

Browse files
author
Chris Cho
committed
add
1 parent 5112443 commit 2c35024

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

source/code-snippets/collation/findOneAndDelete-collation.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
than 100 in the "a" field when ordered by using the
44
English numeric collation order.
55
*/
6+
// start findOneAndDelete collation
67
myColl.findOneAndDelete(
78
{ a: { $gt: "100" } },
89
{ collation: { locale: "en", numericOrdering: true } },
9-
);
10+
);
11+
// end findOneAndDelete collation

source/code-snippets/collation/findOneAndDelete-no-collation.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,6 @@
33
than 100 in the "a" field when ordered by using the default
44
binary collation order.
55
*/
6-
await myColl.findOneAndDelete({ a: { $gt: "100" } });
6+
// start findOneAndDelete no collation
7+
await myColl.findOneAndDelete({ a: { $gt: "100" } });
8+
// end findOneAndDelete no collation

source/code-snippets/collation/findOneAndUpdate-default-order-collation.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
that precedes "Gunter" when ordered by using the
44
default binary collation order.
55
*/
6+
// start findOneAndUpdate default order collation
67
myColl.findOneAndUpdate(
78
{ first_name : { $lt: "Gunter" } },
89
{ $set: { verified: true } }
9-
);
10+
);
11+
// end findOneAndUpdate default order collation

0 commit comments

Comments
 (0)