public static class MergeOperation.MergeOperationBuilder extends Object
MergeOperation.| Constructor and Description |
|---|
MergeOperationBuilder() |
| Modifier and Type | Method and Description |
|---|---|
MergeOperation |
build() |
MergeOperation.MergeOperationBuilder |
exposeVariablesOf(VariableOperators.Let let)
Expose the variables defined by
VariableOperators.Let to the update
aggregation. |
MergeOperation.MergeOperationBuilder |
id(MergeOperation.UniqueMergeId id)
Set the identifier that determines if a results document matches an already existing document in the output
collection.
|
MergeOperation.MergeOperationBuilder |
inDatabase(String database)
Optionally define a target database if different from the current one.
|
MergeOperation.MergeOperationBuilder |
into(MergeOperation.MergeOperationTarget into)
Define the target to store results in.
|
MergeOperation.MergeOperationBuilder |
intoCollection(String collection)
Required output collection name to store results to.
|
MergeOperation.MergeOperationBuilder |
let(VariableOperators.Let let)
Expose the variables defined by
VariableOperators.Let to the update
aggregation. |
MergeOperation.MergeOperationBuilder |
on(String... fields)
Appends a single field or multiple fields that act as a unique identifier for a document.
|
MergeOperation.MergeOperationBuilder |
target(MergeOperation.MergeOperationTarget target)
Define the target to store results in.
|
MergeOperation.MergeOperationBuilder |
whenDocumentsDontMatch(MergeOperation.WhenDocumentsDontMatch whenNotMatched)
The action to take place when documents do not already exist in the target collection.
|
MergeOperation.MergeOperationBuilder |
whenDocumentsMatch(MergeOperation.WhenDocumentsMatch whenMatched)
The action to take place when documents already exist in the target collection.
|
MergeOperation.MergeOperationBuilder |
whenDocumentsMatchApply(Aggregation aggregation)
The
action to take place when documents already exist in the target collection. |
MergeOperation.MergeOperationBuilder |
whenMatched(MergeOperation.WhenDocumentsMatch whenMatched)
The action to take place when documents already exist in the target collection.
|
MergeOperation.MergeOperationBuilder |
whenNotMatched(MergeOperation.WhenDocumentsDontMatch whenNotMatched)
The action to take place when documents do not already exist in the target collection.
|
public MergeOperation.MergeOperationBuilder intoCollection(String collection)
collection - must not be null nor empty.public MergeOperation.MergeOperationBuilder inDatabase(String database)
database - must not be null.public MergeOperation.MergeOperationBuilder into(MergeOperation.MergeOperationTarget into)
into - must not be null.public MergeOperation.MergeOperationBuilder target(MergeOperation.MergeOperationTarget target)
target - must not be null.public MergeOperation.MergeOperationBuilder on(String... fields)
on, unless it's the _id
field.fields - must not be null.public MergeOperation.MergeOperationBuilder id(MergeOperation.UniqueMergeId id)
id - must not be null.public MergeOperation.MergeOperationBuilder let(VariableOperators.Let let)
VariableOperators.Let to the update
aggregation.let - the variable expressionspublic MergeOperation.MergeOperationBuilder exposeVariablesOf(VariableOperators.Let let)
VariableOperators.Let to the update
aggregation.let - the variable expressionspublic MergeOperation.MergeOperationBuilder whenMatched(MergeOperation.WhenDocumentsMatch whenMatched)
whenMatched - must not be null.public MergeOperation.MergeOperationBuilder whenDocumentsMatch(MergeOperation.WhenDocumentsMatch whenMatched)
whenMatched - must not be null.public MergeOperation.MergeOperationBuilder whenDocumentsMatchApply(Aggregation aggregation)
action to take place when documents already exist in the target collection.aggregation - must not be null.public MergeOperation.MergeOperationBuilder whenNotMatched(MergeOperation.WhenDocumentsDontMatch whenNotMatched)
whenNotMatched - must not be null.public MergeOperation.MergeOperationBuilder whenDocumentsDontMatch(MergeOperation.WhenDocumentsDontMatch whenNotMatched)
whenNotMatched - must not be null.public MergeOperation build()
MergeOperation.Copyright © 2011–2022 Pivotal Software, Inc.. All rights reserved.