create View
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
view Name
the name of the view to create
view On
the backing collection/view for the view
pipeline
the pipeline that defines the view
create View Options
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
client Session
the client session with which to associate this operation
view Name
the name of the view to create
view On
the backing collection/view for the view
pipeline
the pipeline that defines the view
create View Options
various options for creating the view