-
Type: Task
-
Resolution: Fixed
-
Priority: Unknown
-
Affects Version/s: None
-
Component/s: None
-
None
Scope
- If $db is included in the input command, preserve it in the output command.
- If $db is not included in the input command, do not add it to the output command.
- Always omit the $db to the command for mongocryptd.
Original description
Currently $db is stripped from the encryption result. With mongocryptd, .Net driver added $db field in MONGOCRYPT_CTX_NEED_MONGO_MARKINGS state. Adding an option to preserve $db, would eliminate the serialization roundtrip for adding $db field in .Net driver.
/**
- mongocrypt_ctx_setopt_include_db configures whether $db is included in the final command.
- If include is true, $db is included in final command.
- If include is false, $db is excluded in final command.
- The default behavior is to exclude $db.
*/
MONGOCRYPT_EXPORT
bool
mongocrypt_ctx_setopt_include_db (mongocrypt_ctx_t *ctx, bool include);