Skip to content
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: 2 additions & 0 deletions source/fundamentals/databases-collections.txt
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ that specifies the validation rules and expressions:
For more information, see the server documentation for :manual:`document
validation </core/document-validation>`.

.. _java-collection-names:

Get a List of Collections
-------------------------

Expand Down
11 changes: 10 additions & 1 deletion source/upgrade.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ Version 5.0 Breaking Changes
- The ``ConnectionId`` constructor now accepts a value of type ``long`` as its second
parameter instead of type ``int``. Similarly, the constructor now accepts a value of
type ``Long`` as its third parameter instead of type ``Integer``. Because this change breaks
binary compatibility, recompile any existing code that calls the ``ConnectionId`` constructor.
binary compatibility, recompile any existing code that calls the
``ConnectionId`` constructor.

- The ``withServerValue()`` method now accepts a parameter of type ``long`` rather than
type ``int``. This change breaks binary compatibility, so you must recompile any code
Expand Down Expand Up @@ -152,6 +153,14 @@ Version 5.0 Breaking Changes
``BsonDecimal128.isNumber()`` now returns ``true``, and
``BsonDecimal128.asNumber()`` returns the equivalent ``BsonNumber``.

.. _java-breaking-changes-v5.0-list-collections:

- This driver version adds support for a new ``authorizedCollection`` option of
the ``listCollections`` command. This introduces a breaking binary
change in the ``MongoDatabase.listCollectionNames()`` methods, meaning any
code using these methods must be recompiled. This change does not require any
changes to source code.

.. _java-breaking-changes-v4.8:

Version 4.8 Breaking Changes
Expand Down
22 changes: 21 additions & 1 deletion source/whats-new.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,27 @@ The 5.0 driver release introduces the following features:

- Changes to the ``ConnectionId`` class. To learn more, see the
:ref:`Version 5.0 Breaking Changes <java-breaking-changes-v5.0>`.


- Changes to the ``com.mongodb.client.MongoDatabase.listCollectionNames()``
methods. The return type is now a
``com.mongodb.client.ListCollectionNamesIterable`` type, while previously it
was a ``MongoIterable<String>``. This change allows the return value to be
configured using the ``ListCollectionNamesIterable.authorizedCollections()``
method and specifying the ``authorizedCollections`` option. Equivalent changes
were made to following classes and interfaces:

- ``com.mongodb.reactivestreams.client.MongoDatabase``
- ``org.mongodb.scala.MongoDatabase``
- ``com.mongodb.kotlin.client.MongoDatabase``
- ``com.mongodb.kotlin.client.coroutine.MongoDatabase``

These changes introduce a :ref:`binary breaking change to the listCollectionsNames()
method <java-breaking-changes-v5.0-list-collections>`. For more information
about the ``MongoDatabase.listCollectionNames()`` method and the
``authorizedCollections`` option, see the
:manual:`listCollections </reference/command/listCollections/>` Server manual
page or :ref:`java-collection-names`.

.. _version-4.11:

What's New in 4.11
Expand Down