summaryrefslogtreecommitdiff
path: root/src/mongo/db/catalog/collection_options.cpp
diff options
context:
space:
mode:
authorBilly Donahue <billy.donahue@mongodb.com>2018-04-02 17:01:35 -0400
committerBilly Donahue <billy.donahue@mongodb.com>2018-04-02 20:04:36 -0400
commita16f90edd5339d3f58bec24e2a1639c0b2fd938e (patch)
tree1142d5c3bc277ca44b407dd28fa04e8303b8867f /src/mongo/db/catalog/collection_options.cpp
parentc872bdd8d24a7beb9df42cbe227e99d6738ba71e (diff)
downloadmongo-a16f90edd5339d3f58bec24e2a1639c0b2fd938e.tar.gz
SERVER-34179 refactor isGenericArgument
Remove the static tables floating around at namespace scope. break CommandHelpers::isGenericArgument into command_generic_argument library so it doesn't have to be inline. Some callers depend on it but would have a circularity if they actually added db/commands to their LIBDEPS.
Diffstat (limited to 'src/mongo/db/catalog/collection_options.cpp')
-rw-r--r--src/mongo/db/catalog/collection_options.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mongo/db/catalog/collection_options.cpp b/src/mongo/db/catalog/collection_options.cpp
index 5cedeab2302..67da1098dd0 100644
--- a/src/mongo/db/catalog/collection_options.cpp
+++ b/src/mongo/db/catalog/collection_options.cpp
@@ -33,6 +33,7 @@
#include <algorithm>
#include "mongo/base/string_data.h"
+#include "mongo/db/command_generic_argument.h"
#include "mongo/db/commands.h"
#include "mongo/db/query/collation/collator_factory_interface.h"
#include "mongo/db/query/collation/collator_interface.h"
@@ -253,7 +254,7 @@ Status CollectionOptions::parse(const BSONObj& options, ParseKind kind) {
}
idIndex = std::move(tempIdIndex);
- } else if (!createdOn24OrEarlier && !CommandHelpers::isGenericArgument(fieldName)) {
+ } else if (!createdOn24OrEarlier && !mongo::isGenericArgument(fieldName)) {
return Status(ErrorCodes::InvalidOptions,
str::stream() << "The field '" << fieldName
<< "' is not a valid collection option. Options: "