Skip to content

Commit 447bb73

Browse files
authored
fix imports and api links for builders pattern (#419)
* fix imports and api links for builders pattern * small fix * small fix * remove quickstart as its in another ticket
1 parent e4d07b6 commit 447bb73

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+162
-158
lines changed

snooty.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ driver-long = "MongoDB Go Driver"
1919
driver-short = "Go driver"
2020
docs-branch = "master"
2121
version = "v2.0"
22+
full-version = "{+version+}.0"
2223
example = "https://raw.githubusercontent.com/mongodb/docs-golang/{+docs-branch+}/source/includes/usage-examples/code-snippets"
2324
api = "https://pkg.go.dev/go.mongodb.org/mongo-driver/{+api-version+}"
2425
stable-api = "Stable API"

source/fundamentals/aggregation.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,13 @@ operations, keep the following in mind:
7272
- Returned documents must not violate the :manual:`BSON document size
7373
limit </reference/limits/#BSON-Document-Size>` of 16 megabytes.
7474
- Pipeline stages have a memory limit of 100 megabytes by default. If
75-
required, you may exceed this limit by using the `allowDiskUse
76-
<{+api+}/mongo/options#AggregateOptions.SetAllowDiskUse>`__
75+
required, you may exceed this limit by using the `allowDiskUse()
76+
<{+api+}/mongo/options#AggregateOptionsBuilder.SetAllowDiskUse>`__
7777
method.
7878
- The :manual:`$graphLookup
7979
</reference/operator/aggregation/graphLookup/>` stage
80-
has a strict memory limit of 100 megabytes and ignores
81-
``allowDiskUse``.
80+
has a strict memory limit of 100 megabytes and ignores the
81+
``allowDiskUse`` setting.
8282

8383
Examples
8484
--------

source/fundamentals/collations.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,4 +306,5 @@ API Documentation:
306306
- `IndexModel <{+api+}/mongo#IndexModel>`__
307307
- `CreateOne() <{+api+}/mongo#IndexView.CreateOne>`__
308308
- `IndexOptions <{+api+}/mongo/options#IndexOptions>`__
309-
- `UpdateOptions <{+api+}/mongo/options#UpdateOptions>`__
309+
- `UpdateOneOptions <{+api+}/mongo/options#UpdateOneOptions>`__
310+
- `UpdateManyOptions <{+api+}/mongo/options#UpdateManyOptions>`__

source/fundamentals/connections/tls.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,4 +209,4 @@ guide, see the following API documentation:
209209
- `ClientOptions <{+api+}/mongo/options#ClientOptions>`__
210210
- `SetTLSConfig() <{+api+}/mongo/options#ClientOptions.SetTLSConfig>`__
211211
- `tls package <https://pkg.go.dev/crypto/tls>`__
212-
- `x509 package <https://pkg.go.dev/crypto/x509>`__
212+
- `x509 package <https://pkg.go.dev/crypto/x509>`__

source/fundamentals/crud/read-operations/limit.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -218,9 +218,10 @@ API Documentation
218218
To learn more about any of the methods or types discussed in this
219219
guide, see the following API Documentation:
220220

221-
- `FindOptions.SetLimit() <{+api+}/mongo/options#FindOptions.SetLimit>`__
222-
- `FindOptions.SetSort() <{+api+}/mongo/options#FindOptions.SetSort>`__
223-
- `FindOptions.SetSkip() <{+api+}/mongo/options#FindOptions.SetSkip>`__
221+
- `FindOptionsBuilder.SetLimit() <{+api+}/mongo/options#FindOptionsBuilder.SetLimit>`__
222+
- `FindOptionsBuilder.SetSort() <{+api+}/mongo/options#FindOptionsBuilder.SetSort>`__
223+
- `FindOptionsBuilder.SetSkip() <{+api+}/mongo/options#FindOptionsBuilder.SetSkip>`__
224224
- `Aggregate() <{+api+}/mongo#Collection.Aggregate>`__
225225
- `CountDocuments() <{+api+}/mongo#Collection.CountDocuments>`__
226226
- `GridFSBucket.Find() <{+api+}/mongo#GridFSBucket.Find>`__
227+

source/fundamentals/crud/read-operations/project.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ To learn more about any of the methods or types discussed in this
228228
guide, see the following API Documentation:
229229

230230
- `Find() <{+api+}/mongo#Collection.Find>`__
231-
- `FindOptions.SetProjection() <{+api+}/mongo/options#FindOptions.SetProjection>`__
231+
- `FindOptionsBuilder.SetProjection() <{+api+}/mongo/options#FindOptionsBuilder.SetProjection>`__
232232
- `FindOne() <{+api+}/mongo#Collection.FindOne>`__
233233
- `FindOneAndDelete() <{+api+}/mongo#Collection.FindOneAndDelete>`__
234234
- `FindOneAndReplace() <{+api+}/mongo#Collection.FindOneAndReplace>`__

source/fundamentals/crud/read-operations/skip.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ To learn more about any of the methods or types discussed in this
174174
guide, see the following API Documentation:
175175

176176
- `Find() <{+api+}/mongo#Collection.Find>`__
177-
- `FindOptions.SetSkip() <{+api+}/mongo/options#FindOptions.SetSkip>`__
177+
- `FindOptionsBuilder.SetSkip() <{+api+}/mongo/options#FindOptionsBuilder.SetSkip>`__
178178
- `Aggregate() <{+api+}/mongo#Collection.Aggregate>`__
179179
- `CountDocuments() <{+api+}/mongo#Collection.CountDocuments>`__
180180
- `GridFSBucket.Find() <{+api+}/mongo#GridFSBucket.Find>`__

source/fundamentals/crud/read-operations/sort.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ To learn more about any of the methods or types discussed in this
277277
guide, see the following API Documentation:
278278

279279
- `Find() <{+api+}/mongo#Collection.Find>`__
280-
- `FindOptions.SetSort() <{+api+}/mongo/options#FindOptions.SetSort>`__
280+
- `FindOptionsBuilder.SetSort() <{+api+}/mongo/options#FindOptionsBuilder.SetSort>`__
281281
- `Aggregate() <{+api+}/mongo#Collection.Aggregate>`__
282282
- `FindOne() <{+api+}/mongo#Collection.FindOne>`__
283283
- `FindOneAndDelete() <{+api+}/mongo#Collection.FindOneAndDelete>`__

source/fundamentals/crud/read-operations/text.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -396,5 +396,5 @@ To learn more about any of the methods or types discussed in this
396396
guide, see the following API Documentation:
397397

398398
- `Find() <{+api+}/mongo#Collection.Find>`__
399-
- `FindOptions.SetSort() <{+api+}/mongo/options#FindOptions.SetSort>`__
400-
- `FindOptions.SetProjection() <{+api+}/mongo/options#FindOptions.SetProjection>`__
399+
- `FindOptionsBuilder.SetSort() <{+api+}/mongo/options#FindOptionsBuilder.SetSort>`__
400+
- `FindOptionsBuilder.SetProjection() <{+api+}/mongo/options#FindOptionsBuilder.SetProjection>`__

source/fundamentals/crud/write-operations/upsert.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ Example
8888

8989
The following example performs the following actions:
9090

91-
- Matches documents where the ``species`` is "Ledebouria socialis" and
92-
the ``plant_id`` is ``3``
91+
- Matches documents where the ``species`` is ``"Ledebouria socialis"``
92+
and the ``plant_id`` is ``3``
9393
- Updates the ``height`` of the matched document to ``8.3``
9494
- Inserts this document if there are no matches to the query filter
9595

@@ -101,7 +101,7 @@ The following example performs the following actions:
101101

102102
filter := bson.D{{"species", "Ledebouria socialis"}, {"plant_id", 3}}
103103
update := bson.D{{"$set", bson.D{{"species", "Ledebouria socialis"}, {"plant_id", 3}, {"height", 8.3}}}}
104-
opts := options.Update().SetUpsert(true)
104+
options.UpdateOne().SetUpsert(true)
105105

106106
result, err := coll.UpdateOne(context.TODO(), filter, update, opts)
107107
if err != nil {
@@ -152,6 +152,6 @@ guide, see the following API Documentation:
152152
- `ReplaceOne() <{+api+}/mongo#Collection.ReplaceOne>`__
153153
- `FindOneAndUpdate() <{+api+}/mongo#Collection.FindOneAndUpdate>`__
154154
- `FindOneAndReplace() <{+api+}/mongo#Collection.FindOneAndReplace>`__
155-
- `UpdateOptions.SetUpsert() <{+api+}/mongo/options#UpdateOptions.SetUpsert>`__
156-
- `ReplaceOptions.SetUpsert() <{+api+}/mongo/options#ReplaceOptions.SetUpsert>`__
155+
- `UpdateOneOptionsBuilder.SetUpsert() <{+api+}/mongo/options#UpdateOneOptionsBuilder.SetUpsert>`__
156+
- `ReplaceOptionsBuilder.SetUpsert() <{+api+}/mongo/options#ReplaceOptionsBuilder.SetUpsert>`__
157157
- `UpdateResult <{+api+}/mongo#UpdateResult>`__

0 commit comments

Comments
 (0)