MongoZioClient

case class MongoZioClient(wrapped: JavaMongoClient) extends Closeable
Companion:
object
trait Serializable
trait Product
trait Equals
trait Closeable
trait AutoCloseable
class Object
trait Matchable
class Any

Value members

Concrete methods

def close(): Unit

Close the client, which will close all underlying cached resources, including, for example, sockets and background monitoring threads.

Close the client, which will close all underlying cached resources, including, for example, sockets and background monitoring threads.

def getDatabase(name: String, codecs: Codec[_]*): Task[MongoZioDatabase]

Gets the database with the given name.

Gets the database with the given name.

def listDatabaseNames(): Int => ZStream[Any, Throwable, String]

Get a list of the database names

Get a list of the database names

def listDatabaseNames(clientSession: ClientSession): ZStream[Any, Throwable, String]

Get a list of the database names

Get a list of the database names

def listDatabases[T]()(using ct: ClassTag[T]): ZStream[Any, Throwable, T]

Get a list of the database names

Get a list of the database names

def listDatabases[T](clientSession: ClientSession)(using ct: ClassTag[T]): ZStream[Any, Throwable, T]

Gets the list of databases

Gets the list of databases

def pureClose(): Task[Unit]

Close the client , which will close all underlying cached resources, including, for example, sockets and background monitoring threads.

Close the client , which will close all underlying cached resources, including, for example, sockets and background monitoring threads.

def startSession(): ZIO[Any, Throwable, ClientSession]

Creates a client session.

Creates a client session.

def startSession(options: ClientSessionOptions): ZIO[Any, Throwable, ClientSession]

Creates a client session.

Creates a client session.

def watch[T]()(using ct: ClassTag[T]): ZStream[Any, Throwable, ChangeStreamDocument[T]]

Creates a change stream for this client.

Creates a change stream for this client.

def watch[T](pipeline: Seq[Bson])(using ct: ClassTag[T]): ZStream[Any, Throwable, ChangeStreamDocument[T]]

Creates a change stream for this collection.

Creates a change stream for this collection.

def watch[T](clientSession: ClientSession)(using ct: ClassTag[T]): ZStream[Any, Throwable, ChangeStreamDocument[T]]

Creates a change stream for this collection.

Creates a change stream for this collection.

def watch[T](clientSession: ClientSession, pipeline: Seq[Bson])(using ct: ClassTag[T]): ZStream[Any, Throwable, ChangeStreamDocument[T]]

Creates a change stream for this collection.

Creates a change stream for this collection.

Inherited methods

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