You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/reference/content/bson/documents.md
+7-7
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ The scala `Document` classes implement `TraversableLike[(String, BsonValue)]` an
20
20
However, unlike `Map` implementations of `TraversableLike` enables strict type safety as there is no variance in the value type.
21
21
{{% /note %}}
22
22
23
-
[`BsonValue`]({{< apiref "org.mongodb.scala.bson.BsonValue" >}}) is the type safe representation of a Bson type from the `org.bson` library, it represents specific value types. The most commonly used value types are:
23
+
[`BsonValue`]({{< apiref "org/mongodb/scala/bson/index" >}}) is the type safe representation of a Bson type from the `org.bson` library, it represents specific value types. The most commonly used value types are:
In the API where we would normally expect a single value or a key value pair or many key value pairs eg: (`BsonValue`, `(String, BsonValue)`
124
124
or `Iterable[(String, BsonValue)]`) we require anything that can become those types via _"`CanBeX`"_ traits that handle the implicit
125
-
conversions necessary to conform to the correct types. These traits are [`CanBeBsonValue`]({{< apiref "org.mongodb.scala.bson.BsonMagnets$$CanBeBsonValue" >}}),
126
-
[`CanBeBsonElement`]({{< apiref "org.mongodb.scala.bson.BsonMagnets$$CanBeBsonElement" >}}) and
conversions necessary to conform to the correct types. These traits are [`CanBeBsonValue`]({{< apiref "org/mongodb/scala/bson/BsonMagnets$$CanBeBsonValue" >}}),
126
+
[`CanBeBsonElement`]({{< apiref ""org/mongodb/scala/bson/BsonMagnets$$CanBeBsonElement" >}}) and
you can also create a collection explicitly in order to customize its configuration. For example, to create a capped collection sized to 1 megabyte:
66
66
67
67
```scala
@@ -99,7 +99,7 @@ collection.createIndex(ascending("i")).printResults("Created an index named: ")
99
99
100
100
## Get a List of Indexes on a Collection
101
101
102
-
Use the [`listIndexes()`]({{< apiref "org.mongodb.scala.MongoCollection@listIndexes[C]()(implicite:org.mongodb.scala.Helpers.DefaultsTo[C,org.mongodb.scala.collection.immutable.Document],implicitct:scala.reflect.ClassTag[C]):org.mongodb.scala.ListIndexesObservable[C]">}}) method to get a list of indexes.
102
+
Use the [`listIndexes()`]({{< apiref "org/mongodb/scala/MongoCollection.html#listIndexes[C]()(implicite:org.mongodb.scala.Helpers.DefaultsTo[C,org.mongodb.scala.collection.immutable.Document],implicitct:scala.reflect.ClassTag[C]):org.mongodb.scala.ListIndexesObservable[C]">}}) method to get a list of indexes.
103
103
104
104
```scala
105
105
collection.listIndexes().printResults()
@@ -167,13 +167,13 @@ For more information about text search see the [text index]({{< docsref "/core/i
167
167
## Running a command
168
168
169
169
While not all commands have a specific helper, however you can run any [command]({{< docsref "/reference/command">}})
170
-
by using the [`runCommand()`]({{< apiref "org.mongodb.scala.MongoDatabase@runCommand[TResult](command:org.bson.conversions.Bson)(implicite:org.mongodb.scala.Helpers.DefaultsTo[TResult,org.mongodb.scala.collection.immutable.Document],implicitct:scala.reflect.ClassTag[TResult]):org.mongodb.scala.Observable[TResult]">}})
170
+
by using the [`runCommand()`]({{< apiref "org/mongodb/scala/MongoDatabase.html#runCommand[TResult](command:org.bson.conversions.Bson)(implicite:org.mongodb.scala.Helpers.DefaultsTo[TResult,org.mongodb.scala.collection.immutable.Document],implicitct:scala.reflect.ClassTag[TResult]):org.mongodb.scala.Observable[TResult]">}})
171
171
method. Here we call the [buildInfo]({{ docsref "reference/command/buildInfo" }}) command:
Copy file name to clipboardExpand all lines: docs/reference/content/getting-started/quick-tour-case-classes.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -107,7 +107,7 @@ The operation completed successfully
107
107
108
108
## Querying the collection
109
109
110
-
Use the [find()]({{< apiref "org.mongodb.scala.MongoCollection@find[C](filter:org.bson.conversions.Bson)(implicite:org.mongodb.scala.Helpers.DefaultsTo[C,org.mongodb.scala.collection.immutable.Document],implicitct:scala.reflect.ClassTag[C]):org.mongodb.scala.FindObservable[C]">}})
110
+
Use the [find()]({{< apiref "org/mongodb/scala/MongoCollection.html#find[C](filter:org.bson.conversions.Bson)(implicite:org.mongodb.scala.Helpers.DefaultsTo[C,org.mongodb.scala.collection.immutable.Document],implicitct:scala.reflect.ClassTag[C]):org.mongodb.scala.FindObservable[C]">}})
111
111
method to query the collection.
112
112
113
113
### Find the first person in a collection
@@ -170,7 +170,7 @@ Which will print out the Person instances for Gertrude, George and Grace.
170
170
## Updating documents
171
171
172
172
There are numerous [update operators](http://docs.mongodb.org/manual/reference/operator/update-field/)
173
-
supported by MongoDB. Use the [Updates]({{< apiref "org.mongodb.scala.model.Updates$">}}) helpers to help update documents in the database.
173
+
supported by MongoDB. Use the [Updates]({{< apiref "org/mongodb/scala/model/Updates$">}}) helpers to help update documents in the database.
174
174
175
175
The following update corrects the hyphenation for Tim Berners-Lee:
176
176
@@ -183,7 +183,7 @@ which provides information about the operation including the number of documents
183
183
184
184
## Deleting documents
185
185
186
-
To delete at most a single document (may be 0 if none match the filter) use the [`deleteOne`]({{< apiref "org.mongodb.scala.MongoCollection@deleteOne(filter:org.bson.conversions.Bson):org.mongodb.scala.Observable[org.mongodb.scala.result.DeleteResult]">}})
186
+
To delete at most a single document (may be 0 if none match the filter) use the [`deleteOne`]({{< apiref "org/mongodb/scala/MongoCollection.html#deleteOne(filter:org.bson.conversions.Bson):org.mongodb.scala.Observable[org.mongodb.scala.result.DeleteResult]">}})
0 commit comments