diff --git a/config/redirects b/config/redirects index 9d2e0208..36e6da8b 100644 --- a/config/redirects +++ b/config/redirects @@ -1,8 +1,8 @@ define: prefix docs/languages/c/c-driver define: base https://www.mongodb.com/${prefix} -define: versions v1.26 v1.27 v1.28 v1.29 v1.30 master +define: versions v1.26 v1.27 v1.28 v1.29 v1.30 v2.0 master -symlink: current -> v1.30 +symlink: current -> v2.0 symlink: upcoming -> master raw: ${prefix}/ -> ${base}/current/ diff --git a/snooty.toml b/snooty.toml index 631c15bc..62706078 100644 --- a/snooty.toml +++ b/snooty.toml @@ -2,27 +2,27 @@ name = "c" title = "C Driver" intersphinx = [ - "https://www.mongodb.com/docs/manual/objects.inv", - "https://www.mongodb.com/docs/atlas/objects.inv", - "https://www.mongodb.com/docs/drivers/objects.inv", + "https://www.mongodb.com/docs/manual/objects.inv", + "https://www.mongodb.com/docs/atlas/objects.inv", + "https://www.mongodb.com/docs/drivers/objects.inv", ] toc_landing_pages = [ - "/databases-collections", - "/read", - "/indexes", - "/work-with-indexes", - "/connect", - "/write", - "/security", + "/databases-collections", + "/read", + "/indexes", + "/work-with-indexes", + "/connect", + "/write", + "/security", ] sharedinclude_root = "https://raw.githubusercontent.com/10gen/docs-shared/main/" [constants] -version = "1.30" -full-version = "{+version+}.2" +version = "2.0" +full-version = "{+version+}.0" is-experimental = "is part of the experimental Queryable Encryption API and may be subject to breaking changes in future releases." range-is-experimental = "Range algorithm is experimental only and not intended for public use. It is subject to breaking changes." api-is-experimental = "This API {+is-experimental+}" diff --git a/source/includes/compatibility/language-compatibility-table-c.rst b/source/includes/compatibility/language-compatibility-table-c.rst index 1e5a5aac..f3c3f87c 100644 --- a/source/includes/compatibility/language-compatibility-table-c.rst +++ b/source/includes/compatibility/language-compatibility-table-c.rst @@ -10,7 +10,7 @@ - C99 - C89 - * - 1.24 to 1.30 + * - 1.24 to 2.0 - ✓ - ✓ - ✓ @@ -20,4 +20,4 @@ - - ✓ - ✓ - - ✓ \ No newline at end of file + - ✓ diff --git a/source/includes/compatibility/mongodb-compatibility-table-c.rst b/source/includes/compatibility/mongodb-compatibility-table-c.rst index ace6548a..1e545b03 100644 --- a/source/includes/compatibility/mongodb-compatibility-table-c.rst +++ b/source/includes/compatibility/mongodb-compatibility-table-c.rst @@ -15,7 +15,7 @@ - MongoDB 4.0 - MongoDB 3.6 - * - 1.28 to 1.30 + * - 1.28 to 2.0 - ✓ - ✓ - ✓ diff --git a/source/whats-new.txt b/source/whats-new.txt index 463a5796..99afde0c 100644 --- a/source/whats-new.txt +++ b/source/whats-new.txt @@ -26,6 +26,7 @@ and deprecations made in each version of the driver libraries. Learn what's new in: +* :ref:`Version 2.0.0 ` * :ref:`Version 1.30.0 ` * :ref:`Version 1.29.0 ` * :ref:`Version 1.28.0 ` @@ -42,6 +43,145 @@ Learn what's new in: .. _c-upcoming-breaking-changes: +.. _c-version-2.0.0: + +What's New in 2.0.0 +-------------------- + +The following sections describe the changes in the 2.0.0 release of +the {+driver-short+}. + +.. important:: Removals + + The 2.0.0 driver release removes many deprecated types and methods. To view + a full list of removals, see the **Removals** sections of the + :github:`v2.0 release notes `. + +{+libbson+} +~~~~~~~ + +The 2.0.0 release of ``{+libbson+}`` includes the following changes: + +New Features +```````````` + +- Adds support for the BSON Binary Vector subtype. To learn more, see + `BSON Binary Vector subtype <{+api-libbson+}/binary_vector.html>`__ in + the {+libbson+} API documentation. + +Changes +``````` + +- Reduces the value of the ``BSON_ERROR_BUFFER_SIZE`` macro from ``504`` + to ``503`` to reserve the final byte for internal use. + +- Renames the following ``pkg-config`` files: + + - ``libbson-1.0``: Renamed to ``bson2`` + - ``libbson-static-1.0``: Renamed to ``bson2-static`` + +- Removes the ``bson-1.0`` CMake package. Instead, use ``bson`` and + specify a version or version range to be imported, as shown in the + following example: + + .. code-block:: c + + find_package(bson 1.30...2.0) + +- Renames the following imported targets: + + - ``mongo::bson_static``: Renamed to ``bson::static`` + - ``mongo::bson_shared``: Renamed to ``bson::shared`` + +- Adds the ``bson::bson`` target, which points to either the static + library or shared library depending on the value of the + ``BSON_DEFAULT_IMPORTED_LIBRARY_TYPE`` CMake option. If you don't set this option and + both library types are available, ``bson::bson`` uses + the static library. + +{+libmongoc+} +~~~~~~~~~ + +The 2.0.0 release of ``{+libmongoc+}`` includes the following changes: + +New Features +```````````` + +- Supports aggregate operations that include ``$lookup`` stages for + In-Use Encryption. To learn more, see the following + references in the {+mdb-server+} manual: + + - :upcoming:`$lookup and $graphLookup Behavior ` for CSFLE + - :upcoming:`$lookup and $graphLookup Behavior ` for QE + +Changes +``````` + +- If you pass the ``batchSize:0`` option to ``mongoc_client_watch``, ``mongoc_database_watch``, + or ``mongoc_collection_watch``, the ``aggregate`` command no longer ignores this option and + applies it. + +- Removes ``bson_oid_init_sequence``. Instead, use ``bson_oid_init``. + +- Changes the return type of ``mongoc_server_description_host`` from ``mongoc_host_list_t *`` + to ``const mongoc_host_list_t *``. + +- Implements the following changes to URI authentication credentials validation, which + apply when creating a new ``mongoc_uri_t`` object from a connection string: + + - Requires that usernames are non-empty for all authentication mechanisms. + - Validates username and password specification requirements and returns + a client error for the specified authentication mechanism. + - For the ``MONGODB-AWS`` authentication mechanism, the ``authSource`` value defaults to + ``$external``. + - Validates ``authMechanism`` values and returns a client error for invalid values. + - Validates ``authMechanismProperties`` values and returns a client error for invalid + properties for the specified authentication mechanism. + - Correctly parses colon (``:``) characters within ``authMechanismProperties`` values. + For example, setting ``authMechanismProperties=A:B,C:D:E,F:G`` caused the driver to + parse the value as ``{'A': 'B', 'C': 'D:E,F:G'}``. This is now parsed as + ``{'A': 'B': 'C': 'D:E', 'F': 'G'}``. + +- Generates an error if you call ``mongoc_bulk_operation_execute`` on the same + ``mongoc_bulk_operation_t`` repeatedly. + +- Consistently applies the ``__cdecl`` calling convention to function declarations in + the public API. + +- ``mongoc_client_set_ssl_opts`` ignores a pooled ``mongoc_client_t`` and logs an error. + Before popping a client, use ``mongoc_client_pool_set_ssl_opts`` to set TLS options on + a ``mongoc_client_pool_t``. + +- ``mongoc_client_set_ssl_stream_initiator`` ignores a pooled ``mongoc_client_t`` and + logs an error. + +- Renames the following ``pkg-config`` files: + + - ``libmongoc-1.0``: Renamed to ``mongoc2`` + - ``libmongoc-static-1.0``: Renamed to ``mongoc2-static`` + +- Removes the ``mongoc-1.0`` CMake package. Instead, use ``mongoc`` and + specify a version or version range to be imported, as shown in the + following example: + + .. code-block:: c + + find_package(mongoc 1.30...2.0) + +- Renames the following imported targets: + + - ``mongo::mongoc_static``: Renamed to ``mongoc::static`` + - ``mongo::mongoc_shared``: Renamed to ``mongoc::shared`` + +- Adds the ``mongoc::mongoc`` target, which points to either the static + library or shared library depending on the value of the + ``MONGOC_DEFAULT_IMPORTED_LIBRARY_TYPE`` CMake option. If you don't set this option and + both library types are available, ``mongoc::mongoc`` uses + the static library. + +For more information about this release, see the :github:`v2.0 release notes +`. + .. _c-version-1.30.0: What's New in 1.30.0 @@ -532,4 +672,4 @@ New Features Improvements ```````````` - Adds ``VERSION_CURRENT`` file in source to ease building -- Considers more errors retryable \ No newline at end of file +- Considers more errors retryable