MongoZioDatabase

case class MongoZioDatabase(javaMongoDatabase: JavaMongoDatabase)
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any

Value members

Concrete methods

def aggregate[C](pipeline: Seq[Bson])(ct: ClassTag[C]): ZStream[Any, Throwable, C]

Aggregates documents according to the specified aggregation pipeline.

Aggregates documents according to the specified aggregation pipeline.

def aggregate[C](clientSession: ClientSession, pipeline: Seq[Bson])(ct: ClassTag[C]): ZStream[Any, Throwable, C]

Aggregates documents according to the specified aggregation pipeline.

Aggregates documents according to the specified aggregation pipeline.

def createCollection(collectionName: String): Task[Completed]

Create a new collection with the given name.

Create a new collection with the given name.

def createCollection(collectionName: String, options: CreateCollectionOptions): Task[Completed]

Create a new collection with the selected options

Create a new collection with the selected options

def createCollection(clientSession: ClientSession, collectionName: String): Task[Completed]

Create a new collection with the given name.

Create a new collection with the given name.

def createCollection(clientSession: ClientSession, collectionName: String, options: CreateCollectionOptions): Task[Completed]

Create a new collection with the selected options

Create a new collection with the selected options

def createView(viewName: String, viewOn: String, pipeline: Seq[Bson]): Task[Completed]

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.

def createView(viewName: String, viewOn: String, pipeline: Seq[Bson], createViewOptions: CreateViewOptions): Task[Completed]

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.

def createView(clientSession: ClientSession, viewName: String, viewOn: String, pipeline: Seq[Bson]): Task[Completed]

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.

def createView(clientSession: ClientSession, viewName: String, viewOn: String, pipeline: Seq[Bson], createViewOptions: CreateViewOptions): Task[Completed]

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.

def drop(): Task[Completed]

Drops this database.

Drops this database.

def drop(clientSession: ClientSession): Task[Completed]

Drops this database.

Drops this database.

def getCollection[TResult](collectionName: String)(using ct: ClassTag[TResult]): Task[MongoZioCollection[TResult]]

Gets a MongoZioCollection, with a specific default document class.

Gets a MongoZioCollection, with a specific default document class.

def listCollectionNames(): Task[String]

Gets the names of all the collections in this database.

Gets the names of all the collections in this database.

def listCollectionNames(clientSession: ClientSession): Task[String]

Gets the names of all the collections in this database.

Gets the names of all the collections in this database.

def listCollections[TResult]()(using ct: ClassTag[TResult]): ZStream[Any, Throwable, TResult]

Finds all the collections in this database.

Finds all the collections in this database.

def listCollections[TResult](clientSession: ClientSession)(using ct: ClassTag[TResult]): ZStream[Any, Throwable, TResult]

Finds all the collections in this database.

Finds all the collections in this database.

def runCommand[TResult](command: Bson)(using ct: ClassTag[TResult]): Task[TResult]

Executes command in the context of the current database.

Executes command in the context of the current database.

def runCommand[TResult](command: Bson, readPreference: ReadPreference)(using ct: ClassTag[TResult]): Task[TResult]

Executes command in the context of the current database.

Executes command in the context of the current database.

def runCommand[TResult](clientSession: ClientSession, command: Bson)(using ct: ClassTag[TResult]): Task[TResult]

Executes command in the context of the current database.

Executes command in the context of the current database.

def runCommand[TResult](clientSession: ClientSession, command: Bson, readPreference: ReadPreference)(using ct: ClassTag[TResult]): Task[TResult]

Executes command in the context of the current database.

Executes command in the context of the current database.

def watch(): ZStream[Any, Throwable, ChangeStreamDocument[Document]]

Creates a change stream for this collection.

Creates a change stream for this collection.

def watch(pipeline: Seq[Bson]): ZStream[Any, Throwable, ChangeStreamDocument[Document]]

Creates a change stream for this collection.

Creates a change stream for this collection.

def watch(clientSession: ClientSession): ZStream[Any, Throwable, ChangeStreamDocument[Document]]

Creates a change stream for this collection.

Creates a change stream for this collection.

def watch(clientSession: ClientSession, pipeline: Seq[Bson]): ZStream[Any, Throwable, ChangeStreamDocument[Document]]

Creates a change stream for this collection.

Creates a change stream for this collection.

def withCodecRegistry(codecRegistry: CodecRegistry): MongoZioDatabase

Create a new MongoZioDatabase instance with a different codec registry.

Create a new MongoZioDatabase instance with a different codec registry.

def withReadConcern(readConcern: ReadConcern): MongoZioDatabase

Create a new MongoZioDatabase instance with a different read concern.

Create a new MongoZioDatabase instance with a different read concern.

def withReadPreference(readPreference: ReadPreference): MongoZioDatabase

Create a new MongoZioDatabase instance with a different read preference.

Create a new MongoZioDatabase instance with a different read preference.

def withWriteConcern(writeConcern: WriteConcern): MongoZioDatabase

Create a new MongoZioDatabase instance with a different write concern.

Create a new MongoZioDatabase instance with a different write concern.

Inherited methods

def productElementNames: Iterator[String]
Inherited from:
Product
def productIterator: Iterator[Any]
Inherited from:
Product

Concrete fields

lazy val codecRegistry: CodecRegistry

Get the codec registry for the MongoDatabase.

Get the codec registry for the MongoDatabase.

lazy val name: String

Gets the name of the database.

Gets the name of the database.

lazy val readConcern: ReadConcern

Get the read concern for the MongoDatabase.

Get the read concern for the MongoDatabase.

lazy val readPreference: ReadPreference

Get the read preference for the MongoDatabase.

Get the read preference for the MongoDatabase.

lazy val writeConcern: WriteConcern

Get the write concern for the MongoDatabase.

Get the write concern for the MongoDatabase.