summaryrefslogtreecommitdiff
path: root/src/mongo/db/ops/parsed_update.h
diff options
context:
space:
mode:
authorDavid Hatch <david.hatch@mongodb.com>2016-06-17 18:00:37 -0400
committerDavid Hatch <david.hatch@mongodb.com>2016-06-21 14:48:46 -0400
commit679ddbe910fd27634f855e245e1bcb2021b28e61 (patch)
tree94015a6b07835e8ff8835747fe01740b35fed5ea /src/mongo/db/ops/parsed_update.h
parent8900241bf9559d4d5afa35fb8dc77ad4e05bba9b (diff)
downloadmongo-679ddbe910fd27634f855e245e1bcb2021b28e61.tar.gz
SERVER-24644 $min/$max update operators respect collation.
Collection default collation is correctly propagated to modifier operations.
Diffstat (limited to 'src/mongo/db/ops/parsed_update.h')
-rw-r--r--src/mongo/db/ops/parsed_update.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/mongo/db/ops/parsed_update.h b/src/mongo/db/ops/parsed_update.h
index eabef19b483..5547cfc8cfd 100644
--- a/src/mongo/db/ops/parsed_update.h
+++ b/src/mongo/db/ops/parsed_update.h
@@ -111,6 +111,21 @@ public:
*/
std::unique_ptr<CanonicalQuery> releaseParsedQuery();
+ /**
+ * Get the collator of the parsed update.
+ */
+ const CollatorInterface* getCollator() const {
+ return _collator.get();
+ }
+
+ /**
+ * Sets this ParsedUpdate's collator.
+ *
+ * This setter can be used to override the collator that was created from the update request
+ * during ParsedUpdate construction.
+ */
+ void setCollator(std::unique_ptr<CollatorInterface> collator);
+
private:
/**
* Parses the query portion of the update request.
@@ -128,6 +143,7 @@ private:
// Unowned pointer to the request object to process.
const UpdateRequest* const _request;
+ // The collator for the parsed update. Owned here.
std::unique_ptr<CollatorInterface> _collator;
// Driver for processing updates on matched documents.