toCollection

suspend fun toCollection()

Aggregates documents according to the specified aggregation pipeline, which must end with a $out or $merge stage.

See also

Throws

if the pipeline does not end with a $out or $merge stage