upsert

fun upsert(vararg additionalFields: Selectable): Pipeline(source)

Writes each document of the previous stages, with additionalFields added, to the path in its __name__ field, creating or replacing the document (stored fields are not merged).


fun upsert(collectionPath: String): Pipeline(source)

Writes each document of the previous stages to the collection at collectionPath, with its own id or a new one, creating or replacing the document.


Writes each document of the previous stages to collection, with its own id or a new one, creating or replacing the document.


fun upsert(collectionPath: String, documentIdExpression: Expression): Pipeline(source)

Writes each document of the previous stages to the collection at collectionPath, with the id documentIdExpression evaluates to, creating or replacing the document.


fun upsert(collection: CollectionReference, documentIdExpression: Expression): Pipeline(source)

Writes each document of the previous stages to collection, with the id documentIdExpression evaluates to, creating or replacing the document.