diff options
author | Maria van Keulen <maria@mongodb.com> | 2017-03-07 12:00:08 -0500 |
---|---|---|
committer | Maria van Keulen <maria@mongodb.com> | 2017-03-07 12:00:08 -0500 |
commit | 589a5c169ced8f6e9ddcd3d182ae1b75db6b7d79 (patch) | |
tree | c7a090ffdd56a91ae677e2492c61b820af44f964 /src/mongo/db/dbhelpers.h | |
parent | 3cba97198638df3750e3b455e2ad57af7ee536ae (diff) | |
download | mongo-589a5c169ced8f6e9ddcd3d182ae1b75db6b7d79.tar.gz |
SERVER-27938 Rename all OperationContext variables to opCtx
This commit is an automated rename of all whole word instances of txn,
_txn, and txnPtr to opCtx, _opCtx, and opCtxPtr, respectively in all
.cpp and .h files in src/mongo.
Diffstat (limited to 'src/mongo/db/dbhelpers.h')
-rw-r--r-- | src/mongo/db/dbhelpers.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/mongo/db/dbhelpers.h b/src/mongo/db/dbhelpers.h index bb303a681c4..3ff0318b687 100644 --- a/src/mongo/db/dbhelpers.h +++ b/src/mongo/db/dbhelpers.h @@ -64,7 +64,7 @@ struct Helpers { Note: does nothing if collection does not yet exist. */ - static void ensureIndex(OperationContext* txn, + static void ensureIndex(OperationContext* opCtx, Collection* collection, BSONObj keyPattern, IndexDescriptor::IndexVersion indexVersion, @@ -82,13 +82,13 @@ struct Helpers { @return true if object found */ - static bool findOne(OperationContext* txn, + static bool findOne(OperationContext* opCtx, Collection* collection, const BSONObj& query, BSONObj& result, bool requireIndex = false); - static RecordId findOne(OperationContext* txn, + static RecordId findOne(OperationContext* opCtx, Collection* collection, const BSONObj& query, bool requireIndex); @@ -97,7 +97,7 @@ struct Helpers { * @param foundIndex if passed in will be set to 1 if ns and index found * @return true if object found */ - static bool findById(OperationContext* txn, + static bool findById(OperationContext* opCtx, Database* db, const char* ns, BSONObj query, @@ -108,7 +108,7 @@ struct Helpers { /* TODO: should this move into Collection? * uasserts if no _id index. * @return null loc if not found */ - static RecordId findById(OperationContext* txn, Collection* collection, const BSONObj& query); + static RecordId findById(OperationContext* opCtx, Collection* collection, const BSONObj& query); /** * Get the first object generated from a forward natural-order scan on "ns". Callers do not @@ -119,25 +119,25 @@ struct Helpers { * * Returns false if there is no such object. */ - static bool getSingleton(OperationContext* txn, const char* ns, BSONObj& result); + static bool getSingleton(OperationContext* opCtx, const char* ns, BSONObj& result); /** * Same as getSingleton, but with a reverse natural-order scan on "ns". */ - static bool getLast(OperationContext* txn, const char* ns, BSONObj& result); + static bool getLast(OperationContext* opCtx, const char* ns, BSONObj& result); /** * Performs an upsert of "obj" into the collection "ns", with an empty update predicate. * Callers must have "ns" locked. */ - static void putSingleton(OperationContext* txn, const char* ns, BSONObj obj); + static void putSingleton(OperationContext* opCtx, const char* ns, BSONObj obj); /** * you have to lock * you do not have to have Context set * o has to have an _id field or will assert */ - static void upsert(OperationContext* txn, + static void upsert(OperationContext* opCtx, const std::string& ns, const BSONObj& o, bool fromMigrate = false); @@ -171,7 +171,7 @@ struct Helpers { * Does oplog the individual document deletions. * // TODO: Refactor this mechanism, it is growing too large */ - static long long removeRange(OperationContext* txn, + static long long removeRange(OperationContext* opCtx, const KeyRange& range, BoundInclusion boundInclusion, const WriteConcernOptions& secondaryThrottle, @@ -184,7 +184,7 @@ struct Helpers { * You do not need to set the database before calling. * Does not oplog the operation. */ - static void emptyCollection(OperationContext* txn, const char* ns); + static void emptyCollection(OperationContext* opCtx, const char* ns); /** * for saving deleted bson objects to a flat file |