uk.gov.hmrc.mongo.MongoUtils
See theMongoUtils companion object
trait MongoUtils
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
object MongoUtils
Members list
Type members
Classlikes
object DuplicateKey
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
DuplicateKey.type
object IndexConflict
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
IndexConflict.type
object IndexNotFound
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
IndexNotFound.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]
In this article