Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOCSP-46367: v5.3 release #95

Merged
merged 1 commit into from
Jan 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config/redirects
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
define: prefix docs/languages/java/reactive-streams-driver
define: base https://www.mongodb.com/${prefix}
define: versions v4.x v5.0 v5.1 v5.2 main
define: versions v4.x v5.0 v5.1 v5.2 v5.3 main

symlink: current -> main

Expand Down
4 changes: 2 additions & 2 deletions snooty.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ toc_landing_pages = [
[constants]
driver-short = "Java Reactive Streams driver"
driver-long = "MongoDB Java Reactive Streams Driver"
version = "5.2"
full-version = "{+version+}.1"
version = "5.3"
full-version = "{+version+}.0"
api = "https://mongodb.github.io/mongo-java-driver/{+version+}/apidocs"
rs-docs = "https://www.reactive-streams.org/reactive-streams-1.0.4-javadoc/org/reactivestreams"
driver-source-gh = "https://github.com/mongodb/mongo-java-driver"
Expand Down
2 changes: 1 addition & 1 deletion source/connect-to-mongo/connection-options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ SRV Configuration

* - **srvServiceName**
- | Sets the SRV service name. See
| the `ClusterSettings.getSrvServiceName() <https://mongodb.github.io/mongo-java-driver/5.1/apidocs/mongodb-driver-core/com/mongodb/connection/ClusterSettings.html#getSrvServiceName()>`__
| the `ClusterSettings.getSrvServiceName() <{+api+}/mongodb-driver-core/com/mongodb/connection/ClusterSettings.html#getSrvServiceName()>`__
| API documentation to learn more.
|
| **Data Type**: {+string-data-type+}
Expand Down
2 changes: 1 addition & 1 deletion source/connect-to-mongo/create-a-mongo-client.txt
Original file line number Diff line number Diff line change
Expand Up @@ -117,4 +117,4 @@ API Documentation
To learn more about creating a ``MongoClient`` instance in the {+driver-short+},
see the following API documentation:

- `MongoClient <https://mongodb.github.io/mongo-java-driver/5.1/apidocs/mongodb-driver-reactivestreams/com/mongodb/reactivestreams/client/MongoClients.html>`__
- `MongoClient <{+api+}/mongodb-driver-reactivestreams/com/mongodb/reactivestreams/client/MongoClients.html>`__
2 changes: 1 addition & 1 deletion source/includes/language-compatibility-table-java-rs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
- Java 7
- Java 6

* - 4.11 to 5.2
* - 4.11 to 5.3
- ✓
- ✓
- ✓
Expand Down
2 changes: 1 addition & 1 deletion source/includes/mongodb-compatibility-table-java-rs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
- MongoDB 4.0
- MongoDB 3.6

* - 5.2
* - 5.2 to 5.3
- ✓
- ✓
- ✓
Expand Down
23 changes: 23 additions & 0 deletions source/whats-new.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,35 @@ What's New
Learn about new features, improvements, and fixes introduced in the
following versions of the {+driver-long+}:

* :ref:`Version 5.3 <javars-version-5.3>`
* :ref:`Version 5.2 <javars-version-5.2>`
* :ref:`Version 5.1.3 <javars-version-5.1.3>`
* :ref:`Version 5.1.2 <javars-version-5.1.2>`
* :ref:`Version 5.1.1 <javars-version-5.1.1>`
* :ref:`Version 5.1 <javars-version-5.1>`

.. _javars-version-5.3:

What's New in 5.3
-----------------

The 5.3 driver release includes the following changes, fixes,
and features:

.. sharedinclude:: dbx/jvm/v5.3-wn-items.rst

.. replacement:: vector-type-example-link

To learn about this type, see the
`BinaryVector <{+api+}/bson/org/bson/BinaryVector.html>`__
API documentation.

.. replacement:: update-replace-example-link

the :ref:`java-rs-write-update-docs`, :ref:`java-rs-write-replace`,
and :ref:`java-rs-bulk-write` guides


.. _javars-version-5.2:

What's New in 5.2
Expand Down
27 changes: 24 additions & 3 deletions source/write/bulk-writes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,6 @@ the following arguments:
operations, see the :manual:`Field Update Operators
</reference/operator/update-field/>` guide in the {+mdb-server+} manual.

``UpdateOneModel`` updates *the first* document that matches your query filter.

The following example creates an instance of ``UpdateOneModel``:

.. literalinclude:: /includes/write/bulk-write.java
Expand All @@ -92,6 +90,16 @@ The following example creates an instance of ``UpdateOneModel``:
:copyable:
:dedent:

If multiple documents match the query filter specified in
the ``UpdateOneModel`` instance, the operation updates the first
result. You can specify a sort in an ``UpdateOptions`` instance to apply
an order to matched documents before the driver performs the update
operation, as shown in the following code:

.. code-block:: java

UpdateOptions options = UpdateOptions.sort(Sorts.ascending("_id"));

To update multiple documents, create an instance of ``UpdateManyModel`` and pass in
the same arguments. ``UpdateManyModel`` updates *all* documents that match your query
filter.
Expand Down Expand Up @@ -122,7 +130,20 @@ The following example creates an instance of ``ReplaceOneModel``:
:copyable:
:dedent:

To replace multiple documents, create an instance of ``ReplaceOneModel`` for each document.
If multiple documents match the query filter specified in
the ``ReplaceOneModel`` instance, the operation replaces the first
result. You can specify a sort in a ``ReplaceOptions`` instance to apply
an order to matched documents before the driver performs the replace
operation, as shown in the following code:

.. code-block:: java

ReplaceOptions options = ReplaceOptions.sort(Sorts.ascending("_id"));

.. tip:: Replace Multiple Documents

To replace multiple documents, create an instance of
``ReplaceOneModel`` for each document.

Delete Operations
~~~~~~~~~~~~~~~~~
Expand Down
10 changes: 5 additions & 5 deletions source/write/insert-documents.txt
Original file line number Diff line number Diff line change
Expand Up @@ -201,10 +201,10 @@ API Documentation
To learn more about any of the methods or types discussed in this
guide, see the following API documentation:

- `insertOne() <https://mongodb.github.io/mongo-java-driver/5.1/apidocs/mongodb-driver-reactivestreams/com/mongodb/reactivestreams/client/MongoCollection.html#insertOne(com.mongodb.reactivestreams.client.ClientSession,TDocument)>`__
- `insertOne() <{+api+}/mongodb-driver-reactivestreams/com/mongodb/reactivestreams/client/MongoCollection.html#insertOne(com.mongodb.reactivestreams.client.ClientSession,TDocument)>`__
- `insertMany()
<https://mongodb.github.io/mongo-java-driver/5.1/apidocs/mongodb-driver-reactivestreams/com/mongodb/reactivestreams/client/MongoCollection.html#insertMany(com.mongodb.reactivestreams.client.ClientSession,java.util.List)>`__
- `InsertOneOptions <https://mongodb.github.io/mongo-java-driver/5.1/apidocs/mongodb-driver-core/com/mongodb/client/model/InsertOneOptions.html>`__
<{+api+}/mongodb-driver-reactivestreams/com/mongodb/reactivestreams/client/MongoCollection.html#insertMany(com.mongodb.reactivestreams.client.ClientSession,java.util.List)>`__
- `InsertOneOptions <{+api+}/mongodb-driver-core/com/mongodb/client/model/InsertOneOptions.html>`__
- `InsertManyOptions
<https://mongodb.github.io/mongo-java-driver/5.1/apidocs/mongodb-driver-core/com/mongodb/client/model/InsertManyOptions.html>`__
- `BsonValue <https://mongodb.github.io/mongo-java-driver/5.1/apidocs/bson/org/bson/BsonValue.html>`__
<{+api+}/mongodb-driver-core/com/mongodb/client/model/InsertManyOptions.html>`__
- `BsonValue <{+api+}/bson/org/bson/BsonValue.html>`__
14 changes: 10 additions & 4 deletions source/write/replace-documents.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,9 @@ Required Parameters

The ``replaceOne()`` method requires the following parameters:

- **Query filter** document, which determines which documents to replace.

For more information about query filters, see the :ref:`<java-rs-specify-query>`
guide.
- **Query filter** document, which determines which documents to
replace. For more information about query filters, see the
:ref:`<java-rs-specify-query>` guide.

- **Replace** document, which specifies the fields and values to insert in the new
document.
Expand Down Expand Up @@ -147,6 +146,13 @@ to modify the ``replaceOne()`` method.
</reference/command/update/#std-label-update-let-syntax>` in the
MongoDB Server manual.

* - ``sort(Bson sort)``
- | Sets the sort criteria to apply to the operation. If multiple
documents match the query filter that you pass to the
``replaceOne()`` method, the operation replaces the first
result. You can set this option to apply an order to matched
documents to have more control over which document is replaced.

* - ``upsert(Boolean upsert)``
- | Specifies whether the replace operation performs an upsert operation if no
documents match the query filter. For more information, see the :manual:`upsert
Expand Down
10 changes: 5 additions & 5 deletions source/write/write-delete-documents.txt
Original file line number Diff line number Diff line change
Expand Up @@ -176,15 +176,15 @@ API Documentation
To learn more about any of the methods or types discussed in this
guide, see the following API documentation:

- `deleteOne() <https://mongodb.github.io/mongo-java-driver/5.1/apidocs/mongodb-driver-reactivestreams/com/mongodb/reactivestreams/client/MongoCollection.html#deleteOne(com.mongodb.reactivestreams.client.ClientSession,org.bson.conversions.Bson)>`__
- `deleteOne() <{+api+}/mongodb-driver-reactivestreams/com/mongodb/reactivestreams/client/MongoCollection.html#deleteOne(com.mongodb.reactivestreams.client.ClientSession,org.bson.conversions.Bson)>`__
- `deleteMany()
<https://mongodb.github.io/mongo-java-driver/5.1/apidocs/mongodb-driver-reactivestreams/com/mongodb/reactivestreams/client/MongoCollection.html#deleteMany(com.mongodb.reactivestreams.client.ClientSession,org.bson.conversions.Bson)>`__
<{+api+}/mongodb-driver-reactivestreams/com/mongodb/reactivestreams/client/MongoCollection.html#deleteMany(com.mongodb.reactivestreams.client.ClientSession,org.bson.conversions.Bson)>`__
- `DeleteOptions
<https://mongodb.github.io/mongo-java-driver/5.1/apidocs/mongodb-driver-core/com/mongodb/client/model/DeleteOptions.html>`__
<{+api+}/mongodb-driver-core/com/mongodb/client/model/DeleteOptions.html>`__
- `BsonValue
<https://mongodb.github.io/mongo-java-driver/5.1/apidocs/bson/org/bson/BsonValue.html>`__
<{+api+}/bson/org/bson/BsonValue.html>`__
- `Collation
<https://mongodb.github.io/mongo-java-driver/5.1/apidocs/mongodb-driver-core/com/mongodb/client/model/Collation.html>`__
<{+api+}/mongodb-driver-core/com/mongodb/client/model/Collation.html>`__



Expand Down
23 changes: 15 additions & 8 deletions source/write/write-update-documents.txt
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ to modify an update operation:
results. For more information, see :manual:`Collation </reference/collation/#std-label-collation>`
in the MongoDB Server manual.

* - ``comment(Bson comment)``
* - ``comment(BsonValue comment)``
- | Attaches a ``Bson`` comment to the operation. For more information, see the :manual:`insert command
fields </reference/command/insert/#command-fields>` guide in the
MongoDB Server manual.
Expand All @@ -190,7 +190,7 @@ to modify an update operation:
For more information, see the :manual:`hint statement </reference/command/update/#std-label-update-command-hint>`
in the MongoDB Server manual.

* - ``hint(String hint)``
* - ``hintString(String hint)``
- | Sets the index for the operation as a ``String`` value.
For more information, see the :manual:`hint statement </reference/command/update/#std-label-update-command-hint>`
in the MongoDB Server manual.
Expand All @@ -202,6 +202,13 @@ to modify an update operation:
</reference/command/update/#std-label-update-let-syntax>` in the
MongoDB Server manual.

* - ``sort(Bson sort)``
- | Sets the sort criteria to apply to the operation. If multiple
documents match the query filter that you pass to the
``updateOne()`` method, the operation updates the first
result. You can set this option to apply an order to matched
documents to have more control over which document is updated.

* - ``upsert(Boolean upsert)``
- | Specifies whether the update operation performs an upsert operation if no
documents match the query filter. For more information, see the :manual:`upsert
Expand Down Expand Up @@ -271,13 +278,13 @@ API Documentation
To learn more about any of the methods or types discussed in this
guide, see the following API documentation:

- `updateOne() <https://mongodb.github.io/mongo-java-driver/5.1/apidocs/mongodb-driver-reactivestreams/com/mongodb/reactivestreams/client/MongoCollection.html#updateOne(com.mongodb.reactivestreams.client.ClientSession,org.bson.conversions.Bson,java.util.List)>`__
- `updateOne() <{+api+}/mongodb-driver-reactivestreams/com/mongodb/reactivestreams/client/MongoCollection.html#updateOne(com.mongodb.reactivestreams.client.ClientSession,org.bson.conversions.Bson,java.util.List)>`__
- `updateMany()
<https://mongodb.github.io/mongo-java-driver/5.1/apidocs/mongodb-driver-reactivestreams/com/mongodb/reactivestreams/client/MongoCollection.html#updateMany(com.mongodb.reactivestreams.client.ClientSession,org.bson.conversions.Bson,java.util.List)>`__
<{+api+}/mongodb-driver-reactivestreams/com/mongodb/reactivestreams/client/MongoCollection.html#updateMany(com.mongodb.reactivestreams.client.ClientSession,org.bson.conversions.Bson,java.util.List)>`__
- `UpdateOptions
<https://mongodb.github.io/mongo-java-driver/5.1/apidocs/mongodb-driver-core/com/mongodb/client/model/UpdateOptions.html>`__
- `UpdateResult <https://mongodb.github.io/mongo-java-driver/5.1/apidocs/mongodb-driver-core/com/mongodb/client/result/UpdateResult.html>`__
<{+api+}/mongodb-driver-core/com/mongodb/client/model/UpdateOptions.html>`__
- `UpdateResult <{+api+}/mongodb-driver-core/com/mongodb/client/result/UpdateResult.html>`__
- `BsonValue
<https://mongodb.github.io/mongo-java-driver/5.1/apidocs/bson/org/bson/BsonValue.html>`__
<{+api+}/bson/org/bson/BsonValue.html>`__
- `Collation
<https://mongodb.github.io/mongo-java-driver/5.1/apidocs/mongodb-driver-core/com/mongodb/client/model/Collation.html>`__
<{+api+}/mongodb-driver-core/com/mongodb/client/model/Collation.html>`__
Loading