diff options
author | Justin Seyster <justin.seyster@mongodb.com> | 2022-03-25 16:18:51 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-06-28 02:27:05 +0000 |
commit | f4484b88afecf96be1ef66c132725d3309a60604 (patch) | |
tree | ab020cafd9a00e8b81045fb6d4c551f0b5b84ca8 /src/mongo/scripting/mozjs/objectwrapper.h | |
parent | 32aff083f4698a2632f8a7037ce4150afa958e90 (diff) | |
download | mongo-f4484b88afecf96be1ef66c132725d3309a60604.tar.gz |
SERVER-61234 Expand support for $function returning scalar BSON values
(cherry picked from commit 88162ec9f40f08fcf4dd31d24aa2532744e13dee)
Diffstat (limited to 'src/mongo/scripting/mozjs/objectwrapper.h')
-rw-r--r-- | src/mongo/scripting/mozjs/objectwrapper.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mongo/scripting/mozjs/objectwrapper.h b/src/mongo/scripting/mozjs/objectwrapper.h index 459f9746fe2..0a5de6b717e 100644 --- a/src/mongo/scripting/mozjs/objectwrapper.h +++ b/src/mongo/scripting/mozjs/objectwrapper.h @@ -34,6 +34,7 @@ #include "mongo/bson/bsonobjbuilder.h" #include "mongo/platform/decimal128.h" +#include "mongo/scripting/engine.h" #include "mongo/scripting/mozjs/exception.h" #include "mongo/scripting/mozjs/internedstring.h" #include "mongo/scripting/mozjs/jsstringwrapper.h" @@ -113,6 +114,11 @@ public: bool getBoolean(Key key); BSONObj getObject(Key key); void getValue(Key key, JS::MutableHandleValue value); + OID getOID(Key key); + // Note: The resulting BSONBinData is only valid within the scope of the 'withBinData' callback. + void getBinData(Key key, std::function<void(const BSONBinData&)> withBinData); + Timestamp getTimestamp(Key key); + JSRegEx getRegEx(Key key); void setNumber(Key key, double val); void setString(Key key, StringData val); |