From 1fa4f57bfc612ec2dc666970ff6091f89bc7d03b Mon Sep 17 00:00:00 2001 From: Rachel Mackintosh Date: Fri, 26 Jan 2024 12:53:47 -0500 Subject: [PATCH 1/8] authorizedCollections breaking change --- source/upgrade.txt | 5 +++++ source/whats-new.txt | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/source/upgrade.txt b/source/upgrade.txt index aba02f3cc..86bfa3e4c 100644 --- a/source/upgrade.txt +++ b/source/upgrade.txt @@ -151,6 +151,11 @@ Version 5.0 Breaking Changes responding in the same way as ``Decimal128`` values. In particular, ``BsonDecimal128.isNumber()`` now returns ``true``, and ``BsonDecimal128.asNumber()`` returns the equivalent ``BsonNumber``. +.. _java-breaking-changes-v5.0-list-collections: + +- This driver version breaks binary compatibility by adding a new + ``authorizedCollection`` option to the ``listCollections`` command. This + change does not require any changes to source code. .. _java-breaking-changes-v4.8: diff --git a/source/whats-new.txt b/source/whats-new.txt index f0f25b207..a92530442 100644 --- a/source/whats-new.txt +++ b/source/whats-new.txt @@ -67,6 +67,14 @@ 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 `. +- A new ``authorizedCollections`` option has been added to the + ``listCollections`` command. It can be configured using the + ``MongoDatabase.listCollectionNames()`` method. This introduces a :ref:`breaking change to the listCollections + command`. + + For more information about ``authorizedCollections``, see the + :manual:`listCollections ` server manual page. + .. _version-4.11: What's New in 4.11 From 8d9f7fca5239e25133978589550a178dadc05460 Mon Sep 17 00:00:00 2001 From: Rachel Mackintosh Date: Fri, 26 Jan 2024 13:17:00 -0500 Subject: [PATCH 2/8] add link --- source/fundamentals/databases-collections.txt | 2 ++ source/whats-new.txt | 11 +++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/source/fundamentals/databases-collections.txt b/source/fundamentals/databases-collections.txt index ed2213071..3a4f787c7 100644 --- a/source/fundamentals/databases-collections.txt +++ b/source/fundamentals/databases-collections.txt @@ -110,6 +110,8 @@ that specifies the validation rules and expressions: For more information, see the server documentation for :manual:`document validation `. +.. _java-collection-names: + Get a List of Collections ------------------------- diff --git a/source/whats-new.txt b/source/whats-new.txt index a92530442..9f80deccc 100644 --- a/source/whats-new.txt +++ b/source/whats-new.txt @@ -69,11 +69,18 @@ The 5.0 driver release introduces the following features: - A new ``authorizedCollections`` option has been added to the ``listCollections`` command. It can be configured using the - ``MongoDatabase.listCollectionNames()`` method. This introduces a :ref:`breaking change to the listCollections + ``MongoDatabase.listCollectionNames()`` method. This introduces a + :ref:`breaking change to the listCollections + +- The ``listCollections`` command has an ``authorizedCollections`` option. It can be configured using the + ``MongoDatabase.listCollectionNames()`` method. This introduces a :ref:`binary + breaking change to the listCollections command`. For more information about ``authorizedCollections``, see the - :manual:`listCollections ` server manual page. + :manual:`listCollections ` server manual + page. For more information about the ``listCollectionNames()`` method, see the + :ref:`Database Collections` page. .. _version-4.11: From 6e36d9dc9f9e2010a3ccc34ab1a1bba3a5f58bfa Mon Sep 17 00:00:00 2001 From: Rachel Mackintosh Date: Thu, 8 Feb 2024 12:08:23 -0500 Subject: [PATCH 3/8] VK review --- source/upgrade.txt | 10 ++++++---- source/whats-new.txt | 31 ++++++++++++++++++------------- 2 files changed, 24 insertions(+), 17 deletions(-) diff --git a/source/upgrade.txt b/source/upgrade.txt index 86bfa3e4c..0bc2cb9c9 100644 --- a/source/upgrade.txt +++ b/source/upgrade.txt @@ -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 @@ -153,9 +154,10 @@ Version 5.0 Breaking Changes ``BsonDecimal128.asNumber()`` returns the equivalent ``BsonNumber``. .. _java-breaking-changes-v5.0-list-collections: -- This driver version breaks binary compatibility by adding a new - ``authorizedCollection`` option to the ``listCollections`` command. This - change does not require any changes to source code. +- This driver version adds a new ``authorizedCollection`` option to the + ``listCollections`` command. This introduces a breaking binary compatibility + 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: diff --git a/source/whats-new.txt b/source/whats-new.txt index 9f80deccc..7f017b991 100644 --- a/source/whats-new.txt +++ b/source/whats-new.txt @@ -66,21 +66,26 @@ 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 `. - -- A new ``authorizedCollections`` option has been added to the - ``listCollections`` command. It can be configured using the - ``MongoDatabase.listCollectionNames()`` method. This introduces a - :ref:`breaking change to the listCollections -- The ``listCollections`` command has an ``authorizedCollections`` option. It can be configured using the - ``MongoDatabase.listCollectionNames()`` method. This introduces a :ref:`binary - breaking change to the listCollections - command`. - - For more information about ``authorizedCollections``, see the +- 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``. This changes 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 listCollections + command`. For more information + about the ``MongoDatabase.listCollectionNames()`` method and the + ``authorizedCollections`` option, see the :manual:`listCollections ` server manual - page. For more information about the ``listCollectionNames()`` method, see the - :ref:`Database Collections` page. + page. .. _version-4.11: From aebeb4f055b1e1afcf8c17853358c876499f54d0 Mon Sep 17 00:00:00 2001 From: Rachel Mackintosh Date: Thu, 8 Feb 2024 12:33:13 -0500 Subject: [PATCH 4/8] tweak --- source/upgrade.txt | 5 +++-- source/whats-new.txt | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/source/upgrade.txt b/source/upgrade.txt index 0bc2cb9c9..8823a28c7 100644 --- a/source/upgrade.txt +++ b/source/upgrade.txt @@ -156,8 +156,9 @@ Version 5.0 Breaking Changes - This driver version adds a new ``authorizedCollection`` option to the ``listCollections`` command. This introduces a breaking binary compatibility - 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. + 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: diff --git a/source/whats-new.txt b/source/whats-new.txt index 7f017b991..53e3ab39f 100644 --- a/source/whats-new.txt +++ b/source/whats-new.txt @@ -84,8 +84,8 @@ The 5.0 driver release introduces the following features: command`. For more information about the ``MongoDatabase.listCollectionNames()`` method and the ``authorizedCollections`` option, see the - :manual:`listCollections ` server manual - page. + :manual:`listCollections ` Server manual + page or :ref:`java-collection-names`. .. _version-4.11: From f7a254b42084c3e511aea903722816b75196d001 Mon Sep 17 00:00:00 2001 From: Rachel Mackintosh Date: Thu, 8 Feb 2024 23:45:37 -0500 Subject: [PATCH 5/8] VK review --- source/upgrade.txt | 5 +++-- source/whats-new.txt | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/source/upgrade.txt b/source/upgrade.txt index 8823a28c7..5c4ad22fc 100644 --- a/source/upgrade.txt +++ b/source/upgrade.txt @@ -152,10 +152,11 @@ Version 5.0 Breaking Changes responding in the same way as ``Decimal128`` values. In particular, ``BsonDecimal128.isNumber()`` now returns ``true``, and ``BsonDecimal128.asNumber()`` returns the equivalent ``BsonNumber``. + .. _java-breaking-changes-v5.0-list-collections: -- This driver version adds a new ``authorizedCollection`` option to the - ``listCollections`` command. This introduces a breaking binary compatibility +- This driver version adds support for a new ``authorizedCollection`` option of the + ``listCollectionsNames()`` method. This introduces a breaking binary compatibility 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. diff --git a/source/whats-new.txt b/source/whats-new.txt index 53e3ab39f..721c58af3 100644 --- a/source/whats-new.txt +++ b/source/whats-new.txt @@ -70,7 +70,7 @@ The 5.0 driver release introduces the following features: - 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``. This changes allows the return value to be + was a ``MongoIterable``. 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: @@ -80,8 +80,8 @@ The 5.0 driver release introduces the following features: - ``com.mongodb.kotlin.client.MongoDatabase`` - ``com.mongodb.kotlin.client.coroutine.MongoDatabase`` - These changes introduce a :ref:` binary breaking change to the listCollections - command`. For more information + These changes introduce a :ref:` binary breaking change to the listCollectionsNames() + method`. For more information about the ``MongoDatabase.listCollectionNames()`` method and the ``authorizedCollections`` option, see the :manual:`listCollections ` Server manual From 123ef1cd9695df320c6f6baf7b4a9a9b3054b870 Mon Sep 17 00:00:00 2001 From: Rachel Mackintosh Date: Thu, 8 Feb 2024 23:54:07 -0500 Subject: [PATCH 6/8] fix link --- source/whats-new.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/whats-new.txt b/source/whats-new.txt index 721c58af3..197216468 100644 --- a/source/whats-new.txt +++ b/source/whats-new.txt @@ -80,8 +80,8 @@ The 5.0 driver release introduces the following features: - ``com.mongodb.kotlin.client.MongoDatabase`` - ``com.mongodb.kotlin.client.coroutine.MongoDatabase`` - These changes introduce a :ref:` binary breaking change to the listCollectionsNames() - method`. For more information + These changes introduce a :ref:`binary breaking change to the listCollectionsNames() + method `. For more information about the ``MongoDatabase.listCollectionNames()`` method and the ``authorizedCollections`` option, see the :manual:`listCollections ` Server manual From d97ed17a2cf4519a86f08ba64addc569e5408b21 Mon Sep 17 00:00:00 2001 From: Rachel Mackintosh Date: Thu, 8 Feb 2024 23:59:37 -0500 Subject: [PATCH 7/8] tweak --- source/upgrade.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/upgrade.txt b/source/upgrade.txt index 5c4ad22fc..4dcc015ad 100644 --- a/source/upgrade.txt +++ b/source/upgrade.txt @@ -155,8 +155,8 @@ Version 5.0 Breaking Changes .. _java-breaking-changes-v5.0-list-collections: -- This driver version adds support for a new ``authorizedCollection`` option of the - ``listCollectionsNames()`` method. This introduces a breaking binary compatibility +- This driver version adds support for a new ``authorizedCollection`` option of + the ``listCollectionsNames()`` method. 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. From 9f7cc49ffa212658365b60a1682ce99c63562815 Mon Sep 17 00:00:00 2001 From: Rachel Mackintosh Date: Mon, 12 Feb 2024 11:23:19 -0500 Subject: [PATCH 8/8] VK review --- source/upgrade.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/upgrade.txt b/source/upgrade.txt index 4dcc015ad..32f148984 100644 --- a/source/upgrade.txt +++ b/source/upgrade.txt @@ -156,7 +156,7 @@ Version 5.0 Breaking Changes .. _java-breaking-changes-v5.0-list-collections: - This driver version adds support for a new ``authorizedCollection`` option of - the ``listCollectionsNames()`` method. This introduces a breaking binary + 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.