31 #include "mongo/db/index/index_descriptor.h" 32 #include "mongo/db/server_options.h" 36 class CollatorInterface;
37 class NamespaceString;
42 namespace index_key_validate {
56 OperationContext*
opCtx,
57 const BSONObj& indexSpec,
58 const NamespaceString& expectedNamespace,
59 const ServerGlobalParams::FeatureCompatibility& featureCompatibility);
79 const BSONObj& indexSpec,
80 const CollatorInterface* defaultCollator);
Copyright (C) 2014 MongoDB Inc.
Definition: bson_collection_catalog_entry.cpp:38
OperationContext Database StringData BSONObj CollectionOptions::ParseKind bool const BSONObj &idIndex Status
Definition: database_impl.cpp:956
StatusWith< BSONObj > validateIndexSpecCollation(OperationContext *opCtx, const BSONObj &indexSpec, const CollatorInterface *defaultCollator)
Validates the 'collation' field in the index specification 'indexSpec' and fills in the full collatio...
Definition: index_key_validate.cpp:471
BSONObj key
Definition: btree_interface.cpp:334
Status validateIdIndexSpec(const BSONObj &indexSpec)
Performs additional validation for _id index specifications.
Definition: index_key_validate.cpp:423
IndexDescriptor::IndexVersion IndexVersion
Definition: collection_compact.cpp:52
Status validateKeyPattern(const BSONObj &key, IndexDescriptor::IndexVersion indexVersion)
Checks if the key is valid for building an index according to the validation rules for the given inde...
Definition: index_key_validate.cpp:103
Definition: index_key_validate.h:40
StatusWith< BSONObj > validateIndexSpec(OperationContext *opCtx, const BSONObj &indexSpec, const NamespaceString &expectedNamespace, const ServerGlobalParams::FeatureCompatibility &featureCompatibility)
Validates the index specification 'indexSpec' and returns an equivalent index specification that has ...
Definition: index_key_validate.cpp:212
Collection *const OperationContext *const opCtx
Definition: collection_impl.cpp:80
Status validateIndexSpecFieldNames(const BSONObj &indexSpec)
Top-level index spec field names are validated here.
Definition: index_key_validate.cpp:453