CDRIVER-5946 remove deprecated index management API #1360
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related to CDRIVER-5946. Followup to mongodb/mongo-c-driver#1957.
The
mongoc_index_opt_*
functions are not corrently used despite being added tomongoc.hh
by CXX-687 (commit) due to their replacement with a BSON-based approach in CXX-1359 (commit). Therefore, it is sufficient to simply remove the functions from the list with no further changes required.Note
mongocxx currently supports index management by manually constructing commands and passing them to mongoc_collection_write_command_with_opts.
The
mongoc_index_storage_opt_type_t
enumeration is being used, but only for theMONGOC_INDEX_STORAGE_OPT_WIREDTIGER
enumerator in a very limited scope. The definition of the enumeration that was removed by mongodb/mongo-c-driver#1957 is copied as-is for traceability and backward compatibility. This can be simplified if preferable (theMONGOC_INDEX_STORAGE_OPT_MMAPV1
enumerator is unused).Note
This copy is declared in
bsoncxx::v_noabi::options
and so does not conflict with the global namespace declaration provided by mongoc even when both are present.No other changes seem to be required following mongodb/mongo-c-driver#1957, although we might want to consider deprecating the
wiredtiger_storage_options
class given its equivalents in the C Driver have been deprecated and removed.