File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
includes/fundamentals/code-snippets/CRUD Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -22,14 +22,15 @@ Configure CRUD Operations
22
22
Retryable Reads and Writes
23
23
--------------------------
24
24
25
- { +driver-short+} automatically retries certain read and write operations a single time
25
+ The +driver-short+} automatically retries certain read and write operations a single time
26
26
if they fail due to a network or server error.
27
27
28
28
You can explicitly disable retryable reads or retryable writes by setting the
29
- ``retryReads `` or ``retryWrites `` option to ``False`` when creating a new client
29
+ ``RetryReads `` or ``RetryWrites `` option to ``False`` when creating a new client
30
30
by using the ``options.Client`` struct.
31
31
32
- The following example disables retryable reads and writes for a client:
32
+ The following example disables retryable reads and writes for a client by using
33
+ the ``ClientOptions`` setter functions:
33
34
34
35
.. literalinclude:: /includes/fundamentals/code-snippets/CRUD/retryableReadsWrites.go
35
36
:start-after: start-retryable-example
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ func main() {
22
22
SetRetryWrites (false ).
23
23
SetRetryReads (false )
24
24
25
- // Creates a new client and connects to the server
25
+ // Creates a new client using the specified options
26
26
client , err := mongo .Connect (clientOps )
27
27
if err != nil {
28
28
panic (err )
You can’t perform that action at this time.
0 commit comments