summaryrefslogtreecommitdiff
path: root/src/mongo/db/dbhelpers.h
diff options
context:
space:
mode:
authorSophia Tan <sophia_tll@hotmail.com>2022-07-06 17:04:19 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-07-06 18:31:40 +0000
commitbab8a18eea2c606f9e05d0c064f90670bf36d327 (patch)
treeef8e08edde9bc427726d706cfdcadf8938099f06 /src/mongo/db/dbhelpers.h
parent3c0fa7f6f17837575cb7a3628e244cec8f50da5f (diff)
downloadmongo-bab8a18eea2c606f9e05d0c064f90670bf36d327.tar.gz
SERVER-65488 Change OldClientContext ctor to take in NamespaceString
Diffstat (limited to 'src/mongo/db/dbhelpers.h')
-rw-r--r--src/mongo/db/dbhelpers.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mongo/db/dbhelpers.h b/src/mongo/db/dbhelpers.h
index ecb7081f29e..047aa9f8534 100644
--- a/src/mongo/db/dbhelpers.h
+++ b/src/mongo/db/dbhelpers.h
@@ -110,18 +110,18 @@ struct Helpers {
*
* Returns false if there is no such object.
*/
- static bool getSingleton(OperationContext* opCtx, const char* ns, BSONObj& result);
+ static bool getSingleton(OperationContext* opCtx, const NamespaceString& nss, BSONObj& result);
/**
* Same as getSingleton, but with a reverse natural-order scan on "ns".
*/
- static bool getLast(OperationContext* opCtx, const char* ns, BSONObj& result);
+ static bool getLast(OperationContext* opCtx, const NamespaceString& nss, 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* opCtx, const char* ns, BSONObj obj);
+ static void putSingleton(OperationContext* opCtx, const NamespaceString& nss, BSONObj obj);
/**
* Callers are expected to hold the collection lock.
@@ -129,7 +129,7 @@ struct Helpers {
* o has to have an _id field or will assert
*/
static UpdateResult upsert(OperationContext* opCtx,
- const std::string& ns,
+ const NamespaceString& nss,
const BSONObj& o,
bool fromMigrate = false);
@@ -140,7 +140,7 @@ struct Helpers {
* on the same storage snapshot.
*/
static UpdateResult upsert(OperationContext* opCtx,
- const std::string& ns,
+ const NamespaceString& nss,
const BSONObj& filter,
const BSONObj& updateMod,
bool fromMigrate = false);
@@ -152,7 +152,7 @@ struct Helpers {
* on the same storage snapshot.
*/
static void update(OperationContext* opCtx,
- const std::string& ns,
+ const NamespaceString& nss,
const BSONObj& filter,
const BSONObj& updateMod,
bool fromMigrate = false);