- data BsonValue
- = BsonDouble Double
- | BsonString ByteString
- | BsonObject BsonDoc
- | BsonArray [BsonValue]
- | BsonUndefined
- | BsonBinary BinarySubType ByteString
- | BsonObjectId ByteString
- | BsonBool !Bool
- | BsonDate POSIXTime
- | BsonNull
- | BsonRegex ByteString String
- | BsonSymbol ByteString
- | BsonInt32 Int32
- | BsonInt64 Int64
- | BsonMinKey
- | BsonMaxKey
- newtype BsonDoc = BsonDoc {}
- toBsonDoc :: BsonDocOps a => [(a, BsonValue)] -> BsonDoc
- data BinarySubType
- = BSTUNDEFINED_1
- | BSTFunction
- | BSTByteArray
- | BSTUUID
- | BSTUNDEFINED_2
- | BSTMD5
- | BSTUserDefined
- empty :: BsonDoc
- lookup :: BsonDocOps a => a -> BsonDoc -> Maybe BsonValue
- fromBson :: (BsonConv a b, Convertible a b) => a -> b
- toBson :: (BsonConv a b, Convertible b a) => b -> a
Types
BsonValue is the type that can be used as a key in a BsonDoc
.
toBsonDoc :: BsonDocOps a => [(a, BsonValue)] -> BsonDocSource
Construct a BsonDoc from an associative list
data BinarySubType Source
BsonDoc Operations
lookup :: BsonDocOps a => a -> BsonDoc -> Maybe BsonValueSource
Return the BsonValue for given key, if any.
Conversion
fromBson :: (BsonConv a b, Convertible a b) => a -> bSource
Convert a BsonValue into a native Haskell type.
toBson :: (BsonConv a b, Convertible b a) => b -> aSource
Convert a native Haskell type into a BsonValue.