@@ -25,7 +25,7 @@ Overview
25
25
This page describes how to implement the builders pattern in your code and describes
26
26
benefits of using builder classes.
27
27
28
- The {+driver-short+} provides type-safe builders classes and methods that enable developers to
28
+ The {+driver-short+} provides type-safe builder classes and methods that enable developers to
29
29
efficiently build queries and aggregations. To learn more about the builders pattern,
30
30
see `Type-safe builders <https://kotlinlang.org/docs/type-safe-builders.html>`__ in the
31
31
{+language+} documentation.
@@ -34,10 +34,8 @@ Why Use the Builders Code Pattern?
34
34
----------------------------------
35
35
36
36
If you use only plain {+language+} to construct BSON query documents, you are not
37
- able to identify errors in your code until runtime.
38
-
39
- When you use builder classes, you can write operators as methods and any syntax errors
40
- will be caught at compile time.
37
+ able to identify errors in your code until runtime. When you use builder classes, you can
38
+ write operators as methods and any syntax errors will be caught at compile time.
41
39
42
40
Example
43
41
-------
@@ -73,7 +71,10 @@ The following sample performs the query by using the MongoDB Query API:
73
71
74
72
.. code-block:: js
75
73
76
- collection.find({ "gender": "female", "age" : { "$gt": 29 }}, { "_id": 0, "email": 1 })
74
+ collection.find(
75
+ { "gender": "female", "age" : { "$gt": 29 }},
76
+ { "_id": 0, "email": 1 }
77
+ )
77
78
78
79
Document Class Filter
79
80
~~~~~~~~~~~~~~~~~~~~~
0 commit comments