diff options
Diffstat (limited to 'src/mongo/db/pipeline/value.cpp')
-rw-r--r-- | src/mongo/db/pipeline/value.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mongo/db/pipeline/value.cpp b/src/mongo/db/pipeline/value.cpp index 664ffb990dc..e3153796b92 100644 --- a/src/mongo/db/pipeline/value.cpp +++ b/src/mongo/db/pipeline/value.cpp @@ -916,4 +916,15 @@ namespace mongo { // Not in default case to trigger better warning if a case is missing verify(false); } + + // TODO make these functions better + void Value::serializeForSorter(BufBuilder& buf) const { + BSONObjBuilder bb(buf); + addToBsonObj(&bb, ""); + bb.doneFast(); + } + Value Value::deserializeForSorter(BufReader& buf, const SorterDeserializeSettings&) { + BSONObj bson = BSONObj::deserializeForSorter(buf, BSONObj::SorterDeserializeSettings()); + return Value(bson.firstElement()); + } } |