A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/mongodb/mongo-c-driver/releases/tag/2.0.0 below:

Release mongo-c-driver 2.0.0 · mongodb/mongo-c-driver · GitHub

Announcing 2.0.0 of libbson and libmongoc, the libraries constituting the MongoDB C Driver.

libbson New Features Changes CMake Packages and Imported Targets

The bson-1.0 CMake package has been removed. Instead, use or bson, and
specify a version or version range to be imported:

find_package(bson 1.30...2.0)

The new package imports different target names:

Removals libmongoc New Features Notes Changes CMake Packages and Imported Targets

The mongoc-1.0 (and bson-1.0) CMake packages have been removed. Instead, use
mongoc or bson, and specify a version or version range to be imported:

find_package(mongoc 1.30...2.0)

The new packages import different target names:

The BSON library has had similar name changes.

Removals Forwarding headers (#include <bson.h> and #include <mongoc.h>)

The compatibility "forwarding" headers have been removed (previously added in 1.13.0). This means it is no longer valid to include the literal header names mongoc.h or bson.h directly:

#include <bson.h> // No longer provided!
#include <mongoc.h> // No longer provided!

Instead, the names must be prefixed with the parent directory: mongoc/mongoc.h and bson/bson.h:

#include <bson/bson.h>
#include <mongoc/mongoc.h>
mongoc_client_kill_cursor

mongoc_client_kill_cursor is removed. It did not accept a server identifier. It was only reliable when connected to a single server.

Sending killCursors is not typically needed. mongoc_cursor_t manages the cursor lifetime. If needed, use a generic command helper to manually send a killCursors command:

bson_t *cmd = BCON_NEW ("killCursors", "coll", "cursors", "[", BCON_INT64 (cursor_id), "]");
bool ok = mongoc_client_command_simple_with_server_id (client, "db", cmd, NULL, server_id, NULL, &error);
if (!ok) {
  printf ("Failed to send 'killCursors': %s\n", error.message);
}
bson_destroy (cmd);
mongoc_client_get_server_status

mongoc_client_get_server_status is removed. Use a command helper to run the "serverStatus" command instead:

bson_t *cmd = BCON_NEW("serverStatus", BCON_INT32(1));
if (!mongoc_client_command_simple(client, "db", cmd, NULL, &reply, &error)) {
    printf("Failed to send 'serverStatus': %s\n", error.message);
} else {
  // TODO: use `reply`
}
bson_destroy(&reply);
bson_destroy(cmd);
Links v1 support notice

New features will no longer be added to the 1.x versions. Critical bug fixes and security patches will continue to be backported to 1.x versions until April 1, 2026. After this date, 1.x versions will not be maintained.

Contributors

Thanks to everyone who contributed to this release.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4