This module exports a Structued
type class which can be used to
convert Haskel "record types" to BSON
objects and vice versa.
As a Mongo document has an "_id" field, we impose the requirement
a record type have a field whose type is SObjId
(corresponding to
"_id").
Documentation
class Structured a whereSource
Structured class used to convert between a Haskell record type and BSON document.
:: a | |
-> Collection | Collection name is then name of type |
:: a | |
-> Document | Convert record to a BSON object |
Structured "_id"
Type corresponding to the "_id" field of a document in a structured object.
isNoSObjId :: SObjId -> BoolSource
Check if the "_id" field is unset.