createView

suspend fun createView(viewName: String, viewOn: String, pipeline: List<Bson>, createViewOptions: CreateViewOptions = CreateViewOptions())

Creates a view with the given name, backing collection/view name, aggregation pipeline, and options that defines the view.

Parameters

viewName

the name of the view to create

viewOn

the backing collection/view for the view

pipeline

the pipeline that defines the view

createViewOptions

various options for creating the view

See also


suspend fun createView(clientSession: ClientSession, viewName: String, viewOn: String, pipeline: List<Bson>, createViewOptions: CreateViewOptions = CreateViewOptions())

Creates a view with the given name, backing collection/view name, aggregation pipeline, and options that defines the view.

Parameters

clientSession

the client session with which to associate this operation

viewName

the name of the view to create

viewOn

the backing collection/view for the view

pipeline

the pipeline that defines the view

createViewOptions

various options for creating the view

See also