diff options
author | ADAM David Alan Martin <adam.martin@10gen.com> | 2017-05-16 13:23:52 -0400 |
---|---|---|
committer | ADAM David Alan Martin <adam.martin@10gen.com> | 2017-05-16 13:23:52 -0400 |
commit | 728dde230dea9e674edeead7d16bffc40ebe541c (patch) | |
tree | 15439082677859a9d702512fed104970c01d429c /src/mongo/db/catalog/coll_mod.cpp | |
parent | 835a13294a78486e0d5458e8814895ea76bf5f7a (diff) | |
download | mongo-728dde230dea9e674edeead7d16bffc40ebe541c.tar.gz |
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.
Diffstat (limited to 'src/mongo/db/catalog/coll_mod.cpp')
-rw-r--r-- | src/mongo/db/catalog/coll_mod.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
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 |