MongoUtils

uk.gov.hmrc.mongo.MongoUtils
See theMongoUtils companion object
trait MongoUtils

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object MongoUtils

Members list

Type members

Classlikes

object DuplicateKey

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
object IndexConflict

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
object IndexNotFound

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type

Value members

Concrete methods

def ensureIndexes[A](collection: MongoCollection[A], indexes: Seq[IndexModel], replaceIndexes: Boolean)(implicit ec: ExecutionContext): Future[Seq[String]]
def ensureSchema[A](mongoComponent: MongoComponent, collection: MongoCollection[A], optSchema: Option[BsonDocument])(implicit ec: ExecutionContext): Future[Unit]

Create the schema if defined, or remove if not defined. Note, the collection will be created if it does not exist yet.

Create the schema if defined, or remove if not defined. Note, the collection will be created if it does not exist yet.

Attributes

def existsCollection[A](mongoComponent: MongoComponent, collection: MongoCollection[A])(implicit ec: ExecutionContext): Future[Boolean]