BSONCodeWithScope
public struct BSONCodeWithScope : Equatable, Hashable
A struct to represent BSON CodeWithScope.
-
A string containing Javascript code.
Declaration
Swift
public let code: String
-
An optional scope
BSONDocument
containing a mapping of identifiers to values, representing the context in whichcode
should be evaluated.Declaration
Swift
public let scope: BSONDocument
-
Initializes a
BSONCodeWithScope
with an optional scope value.Declaration
Swift
public init(code: String, scope: BSONDocument)