Skip to content

CXX-3157 Remove mongocxx::v_noabi::options::create_collection #1255

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

Merged
merged 1 commit into from
Nov 4, 2024
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Changes prior to 3.9.0 are documented as [release notes on GitHub](https://githu
- Inline namespace macros for bsoncxx and mongocxx namespace: `*_INLINE_NAMESPACE_*`.
- The `<bsoncxx/types/value.hpp>` header.
- The `<bsoncxx/util/functor.hpp>` header.
- The `<mongocxx/options/create_collection.hpp>` header.
- References to deprecated `utf8` which have equivalent `string` alternatives.
- `k_utf8` in `bsoncxx::v_noabi::type`. Use `k_string` instead.
- `b_utf8` in `bsoncxx::v_noabi::types`. Use `b_string` instead.
Expand Down
1 change: 1 addition & 0 deletions examples/mongocxx/document_validation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <mongocxx/exception/exception.hpp>
#include <mongocxx/instance.hpp>
#include <mongocxx/uri.hpp>
#include <mongocxx/validation_criteria.hpp>

#include <examples/macros.hh>

Expand Down
102 changes: 0 additions & 102 deletions src/mongocxx/include/mongocxx/v_noabi/mongocxx/database.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
#include <mongocxx/client_session.hpp>
#include <mongocxx/collection.hpp>
#include <mongocxx/gridfs/bucket.hpp>
#include <mongocxx/options/create_collection.hpp>
#include <mongocxx/options/gridfs/bucket.hpp>
#include <mongocxx/read_preference.hpp>
#include <mongocxx/write_concern.hpp>
Expand Down Expand Up @@ -235,101 +234,6 @@ class database {
bsoncxx::v_noabi::document::view_or_value collection_options = {},
const bsoncxx::v_noabi::stdx::optional<write_concern>& write_concern = {});

///
/// Explicitly creates a collection in this database with the specified options.
///
/// @deprecated
/// This overload is deprecated. Call database::create_collection with a
/// bsoncxx::v_noabi::document::view_or_value collection_options instead.
///
/// @see
/// - https://www.mongodb.com/docs/manual/reference/command/create/
///
/// @param name
/// the new collection's name.
/// @param collection_options
/// the options for the new collection.
/// @param write_concern
/// the write concern to use for this operation. Will default to database
/// set write concern if none passed here.
///
/// @exception
/// mongocxx::v_noabi::operation_exception if the operation fails.
///
MONGOCXX_DEPRECATED MONGOCXX_ABI_EXPORT_CDECL(mongocxx::v_noabi::collection) create_collection(
bsoncxx::v_noabi::string::view_or_value name,
const options::create_collection_deprecated& collection_options,
const bsoncxx::v_noabi::stdx::optional<write_concern>& write_concern = {}) {
return create_collection_deprecated(name, collection_options, write_concern);
}

MONGOCXX_ABI_EXPORT_CDECL(mongocxx::v_noabi::collection)
create_collection_deprecated(
bsoncxx::v_noabi::string::view_or_value name,
const options::create_collection_deprecated& collection_options,
const bsoncxx::v_noabi::stdx::optional<write_concern>& write_concern = {});

///
/// Explicitly creates a collection in this database with the specified options.
///
/// @deprecated
/// This overload is deprecated. Call database::create_collection with a
/// bsoncxx::v_noabi::document::view_or_value collection_options instead.
///
/// @see
/// - https://www.mongodb.com/docs/manual/reference/command/create/
///
/// @param session
/// The mongocxx::v_noabi::client_session with which to perform the create operation.
/// @param name
/// the new collection's name.
/// @param collection_options
/// the options for the new collection.
/// @param write_concern
/// the write concern to use for this operation. Will default to database
/// set write concern if none passed here.
///
/// @exception
/// mongocxx::v_noabi::operation_exception if the operation fails.
///
MONGOCXX_DEPRECATED MONGOCXX_ABI_EXPORT_CDECL(mongocxx::v_noabi::collection) create_collection(
const client_session& session,
bsoncxx::v_noabi::string::view_or_value name,
const options::create_collection_deprecated& collection_options,
const bsoncxx::v_noabi::stdx::optional<write_concern>& write_concern = {}) {
return create_collection_deprecated(session, name, collection_options, write_concern);
}

///
/// Explicitly creates a collection in this database with the specified options.
///
/// @deprecated
/// This overload is deprecated. Call database::create_collection with a
/// bsoncxx::v_noabi::document::view_or_value collection_options instead.
///
/// @see
/// - https://www.mongodb.com/docs/manual/reference/command/create/
///
/// @param session
/// The mongocxx::v_noabi::client_session with which to perform the create operation.
/// @param name
/// the new collection's name.
/// @param collection_options
/// the options for the new collection.
/// @param write_concern
/// the write concern to use for this operation. Will default to database
/// set write concern if none passed here.
///
/// @exception
/// mongocxx::v_noabi::operation_exception if the operation fails.
///
MONGOCXX_ABI_EXPORT_CDECL(mongocxx::v_noabi::collection)
create_collection_deprecated(
const client_session& session,
bsoncxx::v_noabi::string::view_or_value name,
const options::create_collection_deprecated& collection_options,
const bsoncxx::v_noabi::stdx::optional<write_concern>& write_concern = {});

///
/// Drops the database and all its collections.
///
Expand Down Expand Up @@ -650,12 +554,6 @@ class database {
bsoncxx::v_noabi::document::view_or_value collection_options,
const bsoncxx::v_noabi::stdx::optional<mongocxx::v_noabi::write_concern>& write_concern);

mongocxx::v_noabi::collection _create_collection_deprecated(
const client_session* session,
bsoncxx::v_noabi::string::view_or_value name,
const options::create_collection_deprecated& collection_options,
const bsoncxx::v_noabi::stdx::optional<mongocxx::v_noabi::write_concern>& write_concern);

cursor _list_collections(const client_session* session,
bsoncxx::v_noabi::document::view_or_value filter);

Expand Down
Loading