Skip to content

Commit ffdb9e2

Browse files
authored
CXX-3157 Remove mongocxx::v_noabi::options::create_collection (#1255)
1 parent 1bd0c94 commit ffdb9e2

File tree

10 files changed

+2
-795
lines changed

10 files changed

+2
-795
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Changes prior to 3.9.0 are documented as [release notes on GitHub](https://githu
1717
- Inline namespace macros for bsoncxx and mongocxx namespace: `*_INLINE_NAMESPACE_*`.
1818
- The `<bsoncxx/types/value.hpp>` header.
1919
- The `<bsoncxx/util/functor.hpp>` header.
20+
- The `<mongocxx/options/create_collection.hpp>` header.
2021
- References to deprecated `utf8` which have equivalent `string` alternatives.
2122
- `k_utf8` in `bsoncxx::v_noabi::type`. Use `k_string` instead.
2223
- `b_utf8` in `bsoncxx::v_noabi::types`. Use `b_string` instead.

examples/mongocxx/document_validation.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include <mongocxx/exception/exception.hpp>
2323
#include <mongocxx/instance.hpp>
2424
#include <mongocxx/uri.hpp>
25+
#include <mongocxx/validation_criteria.hpp>
2526

2627
#include <examples/macros.hh>
2728

src/mongocxx/include/mongocxx/v_noabi/mongocxx/database.hpp

Lines changed: 0 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
#include <mongocxx/client_session.hpp>
2929
#include <mongocxx/collection.hpp>
3030
#include <mongocxx/gridfs/bucket.hpp>
31-
#include <mongocxx/options/create_collection.hpp>
3231
#include <mongocxx/options/gridfs/bucket.hpp>
3332
#include <mongocxx/read_preference.hpp>
3433
#include <mongocxx/write_concern.hpp>
@@ -235,101 +234,6 @@ class database {
235234
bsoncxx::v_noabi::document::view_or_value collection_options = {},
236235
const bsoncxx::v_noabi::stdx::optional<write_concern>& write_concern = {});
237236

238-
///
239-
/// Explicitly creates a collection in this database with the specified options.
240-
///
241-
/// @deprecated
242-
/// This overload is deprecated. Call database::create_collection with a
243-
/// bsoncxx::v_noabi::document::view_or_value collection_options instead.
244-
///
245-
/// @see
246-
/// - https://www.mongodb.com/docs/manual/reference/command/create/
247-
///
248-
/// @param name
249-
/// the new collection's name.
250-
/// @param collection_options
251-
/// the options for the new collection.
252-
/// @param write_concern
253-
/// the write concern to use for this operation. Will default to database
254-
/// set write concern if none passed here.
255-
///
256-
/// @exception
257-
/// mongocxx::v_noabi::operation_exception if the operation fails.
258-
///
259-
MONGOCXX_DEPRECATED MONGOCXX_ABI_EXPORT_CDECL(mongocxx::v_noabi::collection) create_collection(
260-
bsoncxx::v_noabi::string::view_or_value name,
261-
const options::create_collection_deprecated& collection_options,
262-
const bsoncxx::v_noabi::stdx::optional<write_concern>& write_concern = {}) {
263-
return create_collection_deprecated(name, collection_options, write_concern);
264-
}
265-
266-
MONGOCXX_ABI_EXPORT_CDECL(mongocxx::v_noabi::collection)
267-
create_collection_deprecated(
268-
bsoncxx::v_noabi::string::view_or_value name,
269-
const options::create_collection_deprecated& collection_options,
270-
const bsoncxx::v_noabi::stdx::optional<write_concern>& write_concern = {});
271-
272-
///
273-
/// Explicitly creates a collection in this database with the specified options.
274-
///
275-
/// @deprecated
276-
/// This overload is deprecated. Call database::create_collection with a
277-
/// bsoncxx::v_noabi::document::view_or_value collection_options instead.
278-
///
279-
/// @see
280-
/// - https://www.mongodb.com/docs/manual/reference/command/create/
281-
///
282-
/// @param session
283-
/// The mongocxx::v_noabi::client_session with which to perform the create operation.
284-
/// @param name
285-
/// the new collection's name.
286-
/// @param collection_options
287-
/// the options for the new collection.
288-
/// @param write_concern
289-
/// the write concern to use for this operation. Will default to database
290-
/// set write concern if none passed here.
291-
///
292-
/// @exception
293-
/// mongocxx::v_noabi::operation_exception if the operation fails.
294-
///
295-
MONGOCXX_DEPRECATED MONGOCXX_ABI_EXPORT_CDECL(mongocxx::v_noabi::collection) create_collection(
296-
const client_session& session,
297-
bsoncxx::v_noabi::string::view_or_value name,
298-
const options::create_collection_deprecated& collection_options,
299-
const bsoncxx::v_noabi::stdx::optional<write_concern>& write_concern = {}) {
300-
return create_collection_deprecated(session, name, collection_options, write_concern);
301-
}
302-
303-
///
304-
/// Explicitly creates a collection in this database with the specified options.
305-
///
306-
/// @deprecated
307-
/// This overload is deprecated. Call database::create_collection with a
308-
/// bsoncxx::v_noabi::document::view_or_value collection_options instead.
309-
///
310-
/// @see
311-
/// - https://www.mongodb.com/docs/manual/reference/command/create/
312-
///
313-
/// @param session
314-
/// The mongocxx::v_noabi::client_session with which to perform the create operation.
315-
/// @param name
316-
/// the new collection's name.
317-
/// @param collection_options
318-
/// the options for the new collection.
319-
/// @param write_concern
320-
/// the write concern to use for this operation. Will default to database
321-
/// set write concern if none passed here.
322-
///
323-
/// @exception
324-
/// mongocxx::v_noabi::operation_exception if the operation fails.
325-
///
326-
MONGOCXX_ABI_EXPORT_CDECL(mongocxx::v_noabi::collection)
327-
create_collection_deprecated(
328-
const client_session& session,
329-
bsoncxx::v_noabi::string::view_or_value name,
330-
const options::create_collection_deprecated& collection_options,
331-
const bsoncxx::v_noabi::stdx::optional<write_concern>& write_concern = {});
332-
333237
///
334238
/// Drops the database and all its collections.
335239
///
@@ -650,12 +554,6 @@ class database {
650554
bsoncxx::v_noabi::document::view_or_value collection_options,
651555
const bsoncxx::v_noabi::stdx::optional<mongocxx::v_noabi::write_concern>& write_concern);
652556

653-
mongocxx::v_noabi::collection _create_collection_deprecated(
654-
const client_session* session,
655-
bsoncxx::v_noabi::string::view_or_value name,
656-
const options::create_collection_deprecated& collection_options,
657-
const bsoncxx::v_noabi::stdx::optional<mongocxx::v_noabi::write_concern>& write_concern);
658-
659557
cursor _list_collections(const client_session* session,
660558
bsoncxx::v_noabi::document::view_or_value filter);
661559

0 commit comments

Comments
 (0)