Service
Value members
Abstract methods
Aggregates documents according to the specified aggregation pipeline.
Aggregates documents according to the specified aggregation pipeline.
- Value parameters:
- pipeline
the aggregate pipeline
- Returns:
a Observable containing the result of the aggregation operation Aggregation
- Note:
Requires MongoDB 3.6 or greater
Aggregates documents according to the specified aggregation pipeline.
Aggregates documents according to the specified aggregation pipeline.
- Value parameters:
- clientSession
the client session with which to associate this operation
- pipeline
the aggregate pipeline
- Returns:
a Observable containing the result of the aggregation operation Aggregation
- Note:
Requires MongoDB 3.6 or greater
Get the codec registry for the MongoDatabase.
Get the codec registry for the MongoDatabase.
- Returns:
the { @link org.bson.codecs.configuration.CodecRegistry}
Create a new collection with the given name.
Create a new collection with the given name.
- Value parameters:
- collectionName
the name for the new collection to create
- Returns:
a Observable identifying when the collection has been created
Create a new collection with the selected options
Create a new collection with the selected options
- Value parameters:
- collectionName
the name for the new collection to create
- options
various options for creating the collection
- Returns:
a Observable identifying when the collection has been created
Create a new collection with the given name.
Create a new collection with the given name.
- Value parameters:
- clientSession
the client session with which to associate this operation
- collectionName
the name for the new collection to create
- Returns:
a Observable identifying when the collection has been created
- Note:
Requires MongoDB 3.6 or greater
Create a new collection with the selected options
Create a new collection with the selected options
- Value parameters:
- clientSession
the client session with which to associate this operation
- collectionName
the name for the new collection to create
- options
various options for creating the collection
- Returns:
a Observable identifying when the collection has been created
- Note:
Requires MongoDB 3.6 or greater
Creates a view with the given name, backing collection/view name, and aggregation pipeline that defines the view.
Creates a view with the given name, backing collection/view name, and aggregation pipeline that defines the view.
- Value parameters:
- pipeline
the pipeline that defines the view
- viewName
the name of the view to create
- viewOn
the backing collection/view for the view
- Note:
Requires MongoDB 3.4 or greater
Creates a view with the given name, backing collection/view name, aggregation pipeline, and options that defines the view.
Creates a view with the given name, backing collection/view name, aggregation pipeline, and options that defines the view.
- Value parameters:
- createViewOptions
various options for creating the view
- pipeline
the pipeline that defines the view
- viewName
the name of the view to create
- viewOn
the backing collection/view for the view
- Note:
Requires MongoDB 3.4 or greater
Creates a view with the given name, backing collection/view name, and aggregation pipeline that defines the view.
Creates a view with the given name, backing collection/view name, and aggregation pipeline that defines the view.
- Value parameters:
- clientSession
the client session with which to associate this operation
- pipeline
the pipeline that defines the view
- viewName
the name of the view to create
- viewOn
the backing collection/view for the view
- Note:
Requires MongoDB 3.6 or greater
Creates a view with the given name, backing collection/view name, aggregation pipeline, and options that defines the view.
Creates a view with the given name, backing collection/view name, aggregation pipeline, and options that defines the view.
- Value parameters:
- clientSession
the client session with which to associate this operation
- createViewOptions
various options for creating the view
- pipeline
the pipeline that defines the view
- viewName
the name of the view to create
- viewOn
the backing collection/view for the view
- Note:
Requires MongoDB 3.6 or greater
Drops this database.
Drops this database.
- Returns:
a Observable identifying when the database has been dropped
Drops this database.
Drops this database.
- Value parameters:
- clientSession
the client session with which to associate this operation
- Returns:
a Observable identifying when the database has been dropped
- Note:
Requires MongoDB 3.6 or greater
Gets a collection, with a specific default document class.
Gets a collection, with a specific default document class.
- Type parameters:
- TResult
the type of the class to use instead of Document.
- Value parameters:
- collectionName
the name of the collection to return
- Returns:
the collection
Gets the names of all the collections in this database.
Gets the names of all the collections in this database.
- Returns:
a Observable with all the names of all the collections in this database
Gets the names of all the collections in this database.
Gets the names of all the collections in this database.
- Value parameters:
- clientSession
the client session with which to associate this operation
- Returns:
a Observable with all the names of all the collections in this database
- Note:
Requires MongoDB 3.6 or greater
Finds all the collections in this database.
Finds all the collections in this database.
- Returns:
the fluent list collections interface
Finds all the collections in this database.
Finds all the collections in this database.
- Value parameters:
- clientSession
the client session with which to associate this operation
- Returns:
the fluent list collections interface
- Note:
Requires MongoDB 3.6 or greater
Get the read concern for the MongoDatabase.
Get the read concern for the MongoDatabase.
- Returns:
the ReadConcern
Get the read preference for the MongoDatabase.
Get the read preference for the MongoDatabase.
- Returns:
the { @link com.mongodb.ReadPreference}
Executes command in the context of the current database using the primary server.
Executes command in the context of the current database using the primary server.
- Value parameters:
- command
the command to be run
- Returns:
a Observable containing the command result
Executes command in the context of the current database.
Executes command in the context of the current database.
- Value parameters:
- command
the command to be run
- readPreference
the ReadPreference to be used when executing the command
- Returns:
a Observable containing the command result
Executes command in the context of the current database using the primary server.
Executes command in the context of the current database using the primary server.
- Value parameters:
- clientSession
the client session with which to associate this operation
- command
the command to be run
- Returns:
a Observable containing the command result
- Note:
Requires MongoDB 3.6 or greater
Executes command in the context of the current database.
Executes command in the context of the current database.
- Type parameters:
- TResult
the type of the class to use instead of Document.
- Value parameters:
- command
the command to be run
- readPreference
the ReadPreference to be used when executing the command
- Returns:
a Observable containing the command result
- Note:
Requires MongoDB 3.6 or greater
Creates a client session.
Creates a client session.
'''Note:''' A ClientSession instance can not be used concurrently in multiple asynchronous operations.
- Note:
Requires MongoDB 3.6 or greater
Creates a client session.
Creates a client session.
'''Note:''' A ClientSession instance can not be used concurrently in multiple asynchronous operations.
- Value parameters:
- options
the options for the client session
- Note:
Requires MongoDB 3.6 or greater
Creates a change stream for this collection.
Creates a change stream for this collection.
- Returns:
the change stream observable
- Note:
Requires MongoDB 4.0 or greater
Creates a change stream for this collection.
Creates a change stream for this collection.
- Value parameters:
- pipeline
the aggregation pipeline to apply to the change stream
- Returns:
the change stream observable
- Note:
Requires MongoDB 4.0 or greater
Creates a change stream for this collection.
Creates a change stream for this collection.
- Value parameters:
- clientSession
the client session with which to associate this operation
- Returns:
the change stream observable
- Note:
Requires MongoDB 4.0 or greater
Creates a change stream for this collection.
Creates a change stream for this collection.
- Value parameters:
- clientSession
the client session with which to associate this operation
- pipeline
the aggregation pipeline to apply to the change stream
- Returns:
the change stream observable
- Note:
Requires MongoDB 4.0 or greater
Create a new MongoDatabase instance with a different codec registry.
Create a new MongoDatabase instance with a different codec registry.
- Value parameters:
- codecRegistry
the new { @link org.bson.codecs.configuration.CodecRegistry} for the collection
- Returns:
a new MongoDatabase instance with the different codec registry
Create a new MongoDatabase instance with a different read concern.
Create a new MongoDatabase instance with a different read concern.
- Value parameters:
- readConcern
the new ReadConcern for the collection
- Returns:
a new MongoDatabase instance with the different ReadConcern
Create a new MongoDatabase instance with a different read preference.
Create a new MongoDatabase instance with a different read preference.
- Value parameters:
- readPreference
the new { @link com.mongodb.ReadPreference} for the collection
- Returns:
a new MongoDatabase instance with the different readPreference
Create a new MongoDatabase instance with a different write concern.
Create a new MongoDatabase instance with a different write concern.
- Value parameters:
- writeConcern
the new { @link com.mongodb.WriteConcern} for the collection
- Returns:
a new MongoDatabase instance with the different writeConcern