From 728dde230dea9e674edeead7d16bffc40ebe541c Mon Sep 17 00:00:00 2001 From: ADAM David Alan Martin Date: Tue, 16 May 2017 13:23:52 -0400 Subject: SERVER-29225 Split off free functions in catalog. The free (mongo namespace) functions in the catalog library are all implemented in terms of the sliced public interface classes for catalog functionality. These can be made a separate library which does not depend upon catalog but instead depends upon the interface classes. --- src/mongo/db/catalog/coll_mod.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'src/mongo/db/catalog/coll_mod.cpp') diff --git a/src/mongo/db/catalog/coll_mod.cpp b/src/mongo/db/catalog/coll_mod.cpp index 3d8ca6cd721..741d5cfac86 100644 --- a/src/mongo/db/catalog/coll_mod.cpp +++ b/src/mongo/db/catalog/coll_mod.cpp @@ -48,6 +48,8 @@ namespace mongo { +namespace { + struct CollModRequest { const IndexDescriptor* idx = nullptr; BSONElement indexExpireAfterSeconds = {}; @@ -257,10 +259,13 @@ void setCollectionOptionFlag(OperationContext* opCtx, invariant(newOptions.flagsSet); } -Status collMod(OperationContext* opCtx, - const NamespaceString& nss, - const BSONObj& cmdObj, - BSONObjBuilder* result) { +} // namespace +} // namespace mongo + +mongo::Status mongo::collMod(OperationContext* opCtx, + const NamespaceString& nss, + const BSONObj& cmdObj, + BSONObjBuilder* result) { StringData dbName = nss.db(); AutoGetDb autoDb(opCtx, dbName, MODE_X); Database* const db = autoDb.getDb(); @@ -394,4 +399,3 @@ Status collMod(OperationContext* opCtx, return Status::OK(); } -} // namespace mongo -- cgit v1.2.1