GenericMongoDatabase

mongo4cats.database.GenericMongoDatabase
abstract class GenericMongoDatabase[F[_], S[_]]

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

def createCollection(name: String, options: CreateCollectionOptions): F[Unit]
def drop(clientSession: ClientSession[F]): F[Unit]

Drops this database.

Drops this database.

Value parameters

clientSession

the client session with which to associate this operation https://docs.mongodb.com/manual/reference/method/db.dropDatabase/

Attributes

Since

1.7

def getCollection[T : ClassTag](name: String, codecRegistry: CodecRegistry): F[GenericMongoCollection[F, T, S]]
def listCollectionNames: F[Iterable[String]]
def listCollectionNames(session: ClientSession[F]): F[Iterable[String]]
def listCollections: F[Iterable[Document]]
def listCollections(session: ClientSession[F]): F[Iterable[Document]]
def runCommand(command: Bson, readPreference: ReadPreference): F[Document]

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

Attributes

Since

1.7

def runCommand(session: ClientSession[F], command: Bson, readPreference: ReadPreference): F[Document]
def underlying: MongoDatabase
def withReadConcern(readConcern: ReadConcern): GenericMongoDatabase[F, S]
def withReadPreference(readPreference: ReadPreference): GenericMongoDatabase[F, S]
def withWriteConcern(writeConcert: WriteConcern): GenericMongoDatabase[F, S]

Concrete methods

def createCollection(name: String): F[Unit]
def getCollection(name: String): F[GenericMongoCollection[F, Document, S]]
def getCollectionWithCodec[T : ClassTag](name: String)(implicit evidence$3: ClassTag[T], cp: MongoCodecProvider[T]): F[GenericMongoCollection[F, T, S]]
def name: String
def readConcern: ReadConcern
def readPreference: ReadPreference
def runCommand(command: Bson): F[Document]
def runCommand(session: ClientSession[F], command: Bson): F[Document]
def withAddedCodec[T : ClassTag](implicit evidence$1: ClassTag[T], cp: MongoCodecProvider[T]): GenericMongoDatabase[F, S]
def writeConcern: WriteConcern