uk.gov.hmrc.mongo.play.json

Members list

Type members

Classlikes

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
trait Codecs

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Codecs
Self type
object Codecs extends Codecs

Attributes

Companion
trait
Supertypes
trait Codecs
class Object
trait Matchable
class Any
Self type
Codecs.type

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
class PlayMongoRepository[A](mongoComponent: MongoComponent, val collectionName: String, val domainFormat: Format[A], val indexes: Seq[IndexModel], val optSchema: Option[BsonDocument], replaceIndexes: Boolean, extraCodecs: Seq[Codec[_]])(implicit evidence$1: ClassTag[A], ec: ExecutionContext) extends MongoDatabaseCollection, ObservableFutureImplicits

Initialise a mongo repository.

Initialise a mongo repository.

Value parameters

collectionName

the name of the mongo collection.

domainFormat

a play Json format to map the domain to mongo entities.

extraCodecs

optional - to support more types

indexes

indexes to ensure are created.

optSchema

optional - to validate entities written to the collection

replaceIndexes

optional - default is false If true, existing indices should be removed/updated to match the provided indices. If false, any old indices are left behind, and indices with changed definitions will throw IndexConflict exceptions.

Attributes

Supertypes
trait MongoDatabaseCollection
class Object
trait Matchable
class Any
Known subtypes