public static class MergeOperation.MergeOperationTarget extends Object
into field of a $merge aggregation stage. inDatabase(String) the collection is created
in the very same database. In this case into is just a single String holding the collection
name.
into: "target-collection-name"
If the collection needs to be in a different database into will be a Document like the following
{
into: {}
}
| Modifier and Type | Method and Description |
|---|---|
static MergeOperation.MergeOperationTarget |
collection(String collection) |
MergeOperation.MergeOperationTarget |
inDatabase(String database)
Optionally specify the target database if different from the source one.
|
public static MergeOperation.MergeOperationTarget collection(String collection)
collection - The output collection results will be stored in. Must not be null.MergeOperation.MergeOperationTarget.public MergeOperation.MergeOperationTarget inDatabase(String database)
database - must not be null.MergeOperation.MergeOperationTarget.Copyright © 2011–2022 Pivotal Software, Inc.. All rights reserved.