[GODRIVER-1338] Add EncodeContext/DecodeContext options Created: 10/Oct/19  Updated: 31/Oct/19  Resolved: 31/Oct/19

Status: Closed
Project: Go Driver
Component/s: BSON
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Divjot Arora (Inactive) Assignee: Divjot Arora (Inactive)
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

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.


Generated at Thu Feb 08 08:36:11 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.