BsonRuntime

Static helper methods called from the generated code for working with BSON

Static members

Static memberDescription
ConvertArray(top, func)
Signature: (top:IBsonTop * func:Func<IBsonTop,'T>) -> 'T []
Type parameters: 'T

Convert BSON array to array of target types

ConvertArrayId(top)
Signature: top:IBsonTop -> IBsonTop []
ConvertArrayOfOptionals(top, func)
Signature: (top:IBsonTop * func:Func<IBsonTop,'T>) -> 'T option []
Type parameters: 'T

Convert BSON array to array of target types

ConvertBoolean
Signature: BsonValue option -> bool option
ConvertBoolean
Signature: BsonValue option -> bool option
ConvertDateTime
Signature: BsonValue option -> DateTime option
ConvertDateTime
Signature: BsonValue option -> DateTime option
ConvertFloat
Signature: BsonValue option -> float option
ConvertFloat
Signature: BsonValue option -> float option
ConvertInteger
Signature: BsonValue option -> int option
ConvertInteger
Signature: BsonValue option -> int option
ConvertInteger64
Signature: BsonValue option -> int64 option
ConvertInteger64
Signature: BsonValue option -> int64 option
ConvertObjectId
Signature: BsonValue option -> ObjectId option
ConvertObjectId
Signature: BsonValue option -> ObjectId option
ConvertOptionalProperty(...)
Signature: (top:IBsonTop * field:string * func:Func<IBsonTop,'T>) -> 'T option
Type parameters: 'T

Optionally get property and convert it to the specified type

ConvertString
Signature: BsonValue option -> string option
ConvertString
Signature: BsonValue option -> string option
CreateDocument(properties)
Signature: (properties:(string * '?6135) []) -> IBsonTop
Type parameters: '?6135

Creates a BsonDocument wrapped in a BsonTop

GetNonOptionalValue(top, converted)
Signature: (top:IBsonTop * converted:'T option) -> 'T
Type parameters: 'T

Operation that extracts the value from an option and reports a meaningful error message if the value is not present.

GetPropertyPacked(top, field)
Signature: (top:IBsonTop * field:string) -> IBsonTop

Get property wrapped in a BsonTop

TryGetPropertyPacked(top, field)
Signature: (top:IBsonTop * field:string) -> IBsonTop option

Optionally get property wrapped in a BsonTop

TryGetPropertyUnpacked(top, field)
Signature: (top:IBsonTop * field:string) -> BsonValue option

Optionally get property of BsonDocument

Fork me on GitHub