Packages

sealed trait CollectionIndexesManager extends AnyRef

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CollectionIndexesManager
  2. AnyRef
  3. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. type Index = indexes.Index { type Pack = CollectionIndexesManager.this.Pack }
  2. abstract type Pack <: SerializationPack

Abstract Value Members

  1. abstract def create(index: Index): Future[WriteResult]

    Creates the given index.

    Creates the given index.

    import scala.concurrent.{ ExecutionContext, Future }
    
    import reactivemongo.api.CollectionMetaCommands
    import reactivemongo.api.indexes.Index
    
    def createIndexes(
      coll: CollectionMetaCommands, is: Seq[Index.Default])(
      implicit ec: ExecutionContext): Future[Unit] =
      Future.sequence(
        is.map(idx => coll.indexesManager.create(idx))).map(_ => {})

    _Warning_: given the options you choose, and the data to index, it can be a long and blocking operation on the database. You should really consider reading http://www.mongodb.org/display/DOCS/Indexes before doing this, especially in production.

    index

    the index to create

  2. abstract def drop(indexName: String): Future[Int]

    Drops the given index on that collection.

    Drops the given index on that collection.

    import scala.concurrent.{ ExecutionContext, Future }
    
    import reactivemongo.api.CollectionMetaCommands
    
    def dropIndex(coll: CollectionMetaCommands, name: String)(
      implicit ec: ExecutionContext): Future[Int] =
      coll.indexesManager.drop(name)
    indexName

    the name of the index to be dropped

    returns

    The number of indexes that were dropped.

  3. abstract def dropAll(): Future[Int]

    Drops all the indexes on that collection.

    Drops all the indexes on that collection.

    import scala.concurrent.{ ExecutionContext, Future }
    import reactivemongo.api.CollectionMetaCommands
    
    def dropAllIndexes(coll: CollectionMetaCommands)(
      implicit ec: ExecutionContext): Future[Int] =
      coll.indexesManager.dropAll()
    returns

    The number of indexes that were dropped.

  4. abstract def ensure(index: Index): Future[Boolean]

    Creates the given index only if it does not exist on this collection.

    Creates the given index only if it does not exist on this collection.

    The following rules are used to check the matching index: - if nsIndex.isDefined, it checks using the index name, - otherwise it checks using the key.

    import scala.concurrent.{ ExecutionContext, Future }
    
    import reactivemongo.api.CollectionMetaCommands
    import reactivemongo.api.indexes.Index
    
    def ensureIndexes(
      coll: CollectionMetaCommands, is: Seq[Index.Default])(
      implicit ec: ExecutionContext): Future[Unit] =
      Future.sequence(
        is.map(idx => coll.indexesManager.ensure(idx))).map(_ => {})

    _Warning_: given the options you choose, and the data to index, it can be a long and blocking operation on the database. You should really consider reading http://www.mongodb.org/display/DOCS/Indexes before doing this, especially in production.

    index

    the index to create

    returns

    true if the index was created, false if it already exists.

  5. abstract def list(): Future[List[Index]]

    Lists the indexes for the current collection.

    Lists the indexes for the current collection.

    import scala.concurrent.{ ExecutionContext, Future }
    import reactivemongo.api.CollectionMetaCommands
    
    def listIndexes(coll: CollectionMetaCommands)(
      implicit ec: ExecutionContext): Future[List[String]] =
      coll.indexesManager.list().map(_.flatMap { idx =>
        idx.name.toList
      })

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String
    Implicit
    This member is added by an implicit conversion from CollectionIndexesManager toany2stringadd[CollectionIndexesManager] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (CollectionIndexesManager, B)
    Implicit
    This member is added by an implicit conversion from CollectionIndexesManager toArrowAssoc[CollectionIndexesManager] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  8. def ensuring(cond: (CollectionIndexesManager) => Boolean, msg: => Any): CollectionIndexesManager
    Implicit
    This member is added by an implicit conversion from CollectionIndexesManager toEnsuring[CollectionIndexesManager] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  9. def ensuring(cond: (CollectionIndexesManager) => Boolean): CollectionIndexesManager
    Implicit
    This member is added by an implicit conversion from CollectionIndexesManager toEnsuring[CollectionIndexesManager] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  10. def ensuring(cond: Boolean, msg: => Any): CollectionIndexesManager
    Implicit
    This member is added by an implicit conversion from CollectionIndexesManager toEnsuring[CollectionIndexesManager] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  11. def ensuring(cond: Boolean): CollectionIndexesManager
    Implicit
    This member is added by an implicit conversion from CollectionIndexesManager toEnsuring[CollectionIndexesManager] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  12. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  14. def formatted(fmtstr: String): String
    Implicit
    This member is added by an implicit conversion from CollectionIndexesManager toStringFormat[CollectionIndexesManager] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  15. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  16. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  17. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  18. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  19. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  20. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  21. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  22. def toString(): String
    Definition Classes
    AnyRef → Any
  23. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  24. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  25. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated @deprecated
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

  2. def [B](y: B): (CollectionIndexesManager, B)
    Implicit
    This member is added by an implicit conversion from CollectionIndexesManager toArrowAssoc[CollectionIndexesManager] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @deprecated
    Deprecated

    (Since version 2.13.0) Use -> instead. If you still wish to display it as one character, consider using a font with programming ligatures such as Fira Code.

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd fromCollectionIndexesManager to any2stringadd[CollectionIndexesManager]

Inherited by implicit conversion StringFormat fromCollectionIndexesManager to StringFormat[CollectionIndexesManager]

Inherited by implicit conversion Ensuring fromCollectionIndexesManager to Ensuring[CollectionIndexesManager]

Inherited by implicit conversion ArrowAssoc fromCollectionIndexesManager to ArrowAssoc[CollectionIndexesManager]

Ungrouped