diff options
Diffstat (limited to 'src/mongo/db/pipeline/document_source_merge.idl')
-rw-r--r-- | src/mongo/db/pipeline/document_source_merge.idl | 28 |
1 files changed, 11 insertions, 17 deletions
diff --git a/src/mongo/db/pipeline/document_source_merge.idl b/src/mongo/db/pipeline/document_source_merge.idl index b2c70a19ea0..fabda43b017 100644 --- a/src/mongo/db/pipeline/document_source_merge.idl +++ b/src/mongo/db/pipeline/document_source_merge.idl @@ -35,25 +35,10 @@ global: - "mongo/db/pipeline/document_source_merge_spec.h" imports: + - "mongo/db/pipeline/document_source_merge_modes.idl" - "mongo/idl/basic_types.idl" - "mongo/s/chunk_version.idl" -enums: - MergeWhenMatchedMode: - description: "Possible merge mode values for 'whenMatched'." - type: string - values: - kFail: "fail" - kMerge: "merge" - kKeepExisting: "keepExisting" - kReplaceWithNew: "replaceWithNew" - - MergeWhenNotMatchedMode: - description: "Possible merge mode values for 'whenNotMatched'." - type: string - values: - kInsert: "insert" - types: MergeTargetNss: bson_serialization_type: any @@ -70,6 +55,15 @@ types: serializer: "::mongo::mergeOnFieldsSerializeToBSON" deserializer: "::mongo::mergeOnFieldsParseFromBSON" + MergeWhenMatchedPolicy: + bson_serialization_type: any + description: Defines a policy strategy describing what to do when there is a matching + document in the target collection. Can hold a value from the + MergeWhenMatchedMode enum, or a custom pipeline definition. + cpp_type: "::mongo::MergeWhenMatchedPolicy" + serializer: "::mongo::mergeWhenMatchedSerializeToBSON" + deserializer: "::mongo::mergeWhenMatchedParseFromBSON" + structs: NamespaceSpec: description: A document used to specify a namespace. @@ -99,7 +93,7 @@ structs: description: A single field or array of fields that uniquely identify a document. whenMatched: - type: MergeWhenMatchedMode + type: MergeWhenMatchedPolicy optional: true description: The merge mode for the merge operation when source and target elements match. |