Module bson

Source
Expand description

The bson module

Bson used in litedb is a subset of that of mongodb, which is implemented in bson crate. And internal representation can be different some portions. To avoid any problem with those differences, we use custom bson structure instead of bson crate.

The following are known differences:

  • We only support MinValue, Null, Int32, Int64, Double, Decimal, String, Document, Array, General Binary, UUID Binary (as GUID), Boolean, DateTime, and MaxValue.
  • The Decimal type is not IEEE 754 Decimal. This uses microsoft’s 128-bit decimal type.

Structs§

Array
Binary
DateTime
DateTime in litedb bson
Decimal128
Microsoft’s decimal128
Document
The bson document.
Guid
Represents GUID (or UUID)
ObjectId
Represents ObjectId

Enums§

BsonType
The type of bson Value
ParseError
Value
The num represents one bson value.

Traits§

BsonReader
BsonWriter
TotalOrd
The trait that is for total order used in LiteDB