-
Type: Improvement
-
Resolution: Won't Do
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: BSON
-
Labels:None
If a user wants to take advantage of EncodeContext/DecodeContext settings like minSize, they have to manually call functions like MarshalWithContext. This means they can't use these options when calling high level functions like InsertOne because those functions always use MarshalAppendWithRegistry and don't allow custom Encode/Decode contexts.
We should add EncodeContext and DecodeContext options to configure Client, Database, and Collection. Like Registry, each level should inherit this option from the previous level if it is not specified.