Packages

  • package root

    This is the documentation for the MongoDB Scala driver.

    This is the documentation for the MongoDB Scala driver.

    Driver structure

    The mongodb scala driver.

    To get started you need a MongoClient instance, either from a connection string or via a org.mongodb.scala.MongoClientSettings.

    Notable packages include:

    Definition Classes
    root
  • package org
    Definition Classes
    root
  • package mongodb
    Definition Classes
    org
  • package scala

    The MongoDB Scala Driver package

    The MongoDB Scala Driver package

    Contains type aliases and companion objects to help when using the Scala API

    Definition Classes
    mongodb
    Since

    1.0

  • package bson

    The bson package, contains mirrors and companion objects for Bson values.

    The bson package, contains mirrors and companion objects for Bson values.

    Definition Classes
    scala
  • package collection

    The collection package.

    The collection package.

    Definition Classes
    bson
  • package mutable
    Definition Classes
    collection
  • Document

case class Document(underlying: BsonDocument) extends BaseDocument[Document] with IterableOps[(String, BsonValue), Iterable, Document] with StrictOptimizedIterableOps[(String, BsonValue), Iterable, Document] with Product with Serializable

An mutable Document implementation.

A strictly typed Map[String, BsonValue] like structure that traverses the elements in insertion order. Unlike native scala maps there is no variance in the value type and it always has to be a BsonValue.

underlying

the underlying BsonDocument which stores the data.

Linear Supertypes
Serializable, Product, Equals, StrictOptimizedIterableOps[(String, BsonValue), Iterable, Document], BaseDocument[Document], Bson, Iterable[(String, BsonValue)], IterableFactoryDefaults[(String, BsonValue), Iterable], IterableOps[(String, BsonValue), Iterable, Document], IterableOnceOps[(String, BsonValue), Iterable, Document], IterableOnce[(String, BsonValue)], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Document
  2. Serializable
  3. Product
  4. Equals
  5. StrictOptimizedIterableOps
  6. BaseDocument
  7. Bson
  8. Iterable
  9. IterableFactoryDefaults
  10. IterableOps
  11. IterableOnceOps
  12. IterableOnce
  13. AnyRef
  14. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new Document(underlying: BsonDocument)

    underlying

    the underlying BsonDocument which stores the data.

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. def +(elems: CanBeBsonElement*): Document

    Creates a new document containing a new key/value and all the existing key/values.

    Creates a new document containing a new key/value and all the existing key/values.

    Mapping kv will override existing mappings from this document with the same key.

    elems

    the key/value mapping to be added. This can be any valid (String, BsonValue) pair that can be transformed into a BsonElement via BsonMagnets.CanBeBsonElement implicits and any BsonTransformers that are in scope.

    returns

    a new document containing mappings of this document and the mapping kv.

    Definition Classes
    BaseDocument
  4. final def ++(suffix: IterableOnce[(String, BsonValue)]): Document
    Annotations
    @inline()
  5. final def ++[B >: (String, BsonValue)](suffix: IterableOnce[B]): Iterable[B]
    Definition Classes
    IterableOps
    Annotations
    @inline()
  6. def ++=(elems: CanBeBsonElements): Document

    Adds all elements produced by a TraversableOnce to this document.

    Adds all elements produced by a TraversableOnce to this document.

    elems

    a sequence of key/values that make up the Document. This can be any valid sequence of (String, BsonValue) pairs that can be transformed into a sequence of BsonElements via BsonMagnets.CanBeBsonElements implicits and any BsonTransformers that are in scope.

    returns

    the document itself.

  7. def +=(elems: CanBeBsonElement*): Document

    Adds a new key/value pair to this document.

    Adds a new key/value pair to this document. If the document already contains a mapping for the key, it will be overridden by the new value.

    elems

    the key/value pair. This can be any valid (String, BsonValue) pair that can be transformed into a BsonElement via BsonMagnets.CanBeBsonElement implicits and any BsonTransformers that are in scope.

    returns

    the document itself

  8. def -(elems: String*): Document

    Removes one or more elements to this document and returns a new document.

    Removes one or more elements to this document and returns a new document.

    elems

    the remaining elements to remove.

    returns

    A new document with the keys removed.

    Definition Classes
    BaseDocument
  9. def --(xs: GenTraversableOnce[String]): Document

    Removes a number of elements provided by a traversable object and returns a new document without the removed elements.

    Removes a number of elements provided by a traversable object and returns a new document without the removed elements.

    xs

    the traversable object consisting of key-value pairs.

    returns

    a new document with the bindings of this document and those from xs.

    Definition Classes
    BaseDocument
  10. def --=(xs: IterableOnce[String]): Document

    Removes all elements produced by an iterator from this document.

    Removes all elements produced by an iterator from this document.

    xs

    the iterator producing the elements to remove.

    returns

    the document itself

  11. def -=(elems: String*): Document

    Removes two or more elements from this document.

    Removes two or more elements from this document.

    elems

    the remaining elements to remove.

    returns

    the document itself

  12. def -=(key: String): Document

    Removes a key from this document.

    Removes a key from this document.

    key

    the key to be removed

    returns

    the document itself.

  13. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  14. final def addString(b: StringBuilder): StringBuilder
    Definition Classes
    IterableOnceOps
    Annotations
    @inline()
  15. final def addString(b: StringBuilder, sep: String): StringBuilder
    Definition Classes
    IterableOnceOps
    Annotations
    @inline()
  16. def addString(b: StringBuilder, start: String, sep: String, end: String): StringBuilder
    Definition Classes
    IterableOnceOps
  17. def apply(underlying: BsonDocument): Document

    Creates a new immutable document

    Creates a new immutable document

    underlying

    the underlying BsonDocument

    returns

    a new document

    Attributes
    protected[scala]
    Definition Classes
    Document → BaseDocument
  18. def apply[TResult <: BsonValue](key: String)(implicit e: DefaultsTo[TResult, BsonValue], ct: ClassTag[TResult]): TResult

    Retrieves the value which is associated with the given key or throws a NoSuchElementException.

    Retrieves the value which is associated with the given key or throws a NoSuchElementException.

    key

    the key

    returns

    the value associated with the given key, or throws NoSuchElementException.

    Definition Classes
    BaseDocument
  19. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  20. def className: String
    Attributes
    protected[this]
    Definition Classes
    Iterable
  21. def clear(): Unit

    Removes all bindings from the document.

    Removes all bindings from the document. After this operation has completed the document will be empty.

  22. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  23. final def coll: Document.this.type
    Attributes
    protected
    Definition Classes
    Iterable → IterableOps
  24. def collect[B](pf: PartialFunction[(String, BsonValue), B]): Iterable[B]
    Definition Classes
    StrictOptimizedIterableOps → IterableOps → IterableOnceOps
  25. def collectFirst[B](pf: PartialFunction[(String, BsonValue), B]): Option[B]
    Definition Classes
    IterableOnceOps
  26. def concat(suffix: IterableOnce[(String, BsonValue)]): Document
  27. def concat[B >: (String, BsonValue)](suffix: IterableOnce[B]): Iterable[B]
    Definition Classes
    IterableOps
  28. def contains(key: String): Boolean

    Tests whether this map contains a binding for a key

    Tests whether this map contains a binding for a key

    key

    the key

    returns

    true if there is a binding for key in this document, false otherwise.

    Definition Classes
    BaseDocument
  29. def copy(): Document

    Copies the document and creates a new one

    Copies the document and creates a new one

    returns

    a new document with a copy of the underlying BsonDocument

  30. def copyToArray[B >: (String, BsonValue)](xs: Array[B], start: Int, len: Int): Int
    Definition Classes
    IterableOnceOps
  31. def copyToArray[B >: (String, BsonValue)](xs: Array[B], start: Int): Int
    Definition Classes
    IterableOnceOps
    Annotations
    @deprecatedOverriding("This should always forward to the 3-arg version of this method", "2.13.4")
  32. def copyToArray[B >: (String, BsonValue)](xs: Array[B]): Int
    Definition Classes
    IterableOnceOps
    Annotations
    @deprecatedOverriding("This should always forward to the 3-arg version of this method", "2.13.4")
  33. def corresponds[B](that: IterableOnce[B])(p: ((String, BsonValue), B) => Boolean): Boolean
    Definition Classes
    IterableOnceOps
  34. def count(p: ((String, BsonValue)) => Boolean): Int
    Definition Classes
    IterableOnceOps
  35. def drop(n: Int): Document
    Definition Classes
    IterableOps → IterableOnceOps
  36. def dropRight(n: Int): Document
    Definition Classes
    StrictOptimizedIterableOps → IterableOps
  37. def dropWhile(p: ((String, BsonValue)) => Boolean): Document
    Definition Classes
    IterableOps → IterableOnceOps
  38. def empty: Document
    Definition Classes
    Document → IterableFactoryDefaults → IterableOps
  39. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  40. def exists(p: ((String, BsonValue)) => Boolean): Boolean
    Definition Classes
    IterableOnceOps
  41. def filter(pred: ((String, BsonValue)) => Boolean): Document
    Definition Classes
    StrictOptimizedIterableOps → IterableOps → IterableOnceOps
  42. def filterImpl(pred: ((String, BsonValue)) => Boolean, isFlipped: Boolean): Document
    Attributes
    protected[scala.collection]
    Definition Classes
    StrictOptimizedIterableOps
  43. def filterKeys(p: (String) => Boolean): Document

    Filters this document by retaining only keys satisfying a predicate.

    Filters this document by retaining only keys satisfying a predicate.

    p

    the predicate used to test keys

    returns

    a new document consisting only of those key value pairs of this map where the key satisfies the predicate p.

    Definition Classes
    BaseDocument
  44. def filterNot(pred: ((String, BsonValue)) => Boolean): Document
    Definition Classes
    StrictOptimizedIterableOps → IterableOps → IterableOnceOps
  45. def find(p: ((String, BsonValue)) => Boolean): Option[(String, BsonValue)]
    Definition Classes
    IterableOnceOps
  46. def flatMap[B](f: ((String, BsonValue)) => IterableOnce[B]): Iterable[B]
    Definition Classes
    StrictOptimizedIterableOps → IterableOps → IterableOnceOps
  47. def flatten[B](implicit toIterableOnce: ((String, BsonValue)) => IterableOnce[B]): Iterable[B]
    Definition Classes
    StrictOptimizedIterableOps → IterableOps → IterableOnceOps
  48. def fold[A1 >: (String, BsonValue)](z: A1)(op: (A1, A1) => A1): A1
    Definition Classes
    IterableOnceOps
  49. def foldLeft[B](z: B)(op: (B, (String, BsonValue)) => B): B
    Definition Classes
    IterableOnceOps
  50. def foldRight[B](z: B)(op: ((String, BsonValue), B) => B): B
    Definition Classes
    IterableOnceOps
  51. def forall(p: ((String, BsonValue)) => Boolean): Boolean
    Definition Classes
    IterableOnceOps
  52. def foreach[U](f: ((String, BsonValue)) => U): Unit

    Applies a function f to all elements of this document.

    Applies a function f to all elements of this document.

    U

    the type parameter describing the result of function f. This result will always be ignored. Typically U is Unit, but this is not necessary.

    f

    the function that is applied for its side-effect to every element. The result of function f is discarded.

    Definition Classes
    Document → IterableOnceOps
  53. def fromSpecific(coll: IterableOnce[(String, BsonValue)]): Document
    Attributes
    protected
    Definition Classes
    Document → IterableFactoryDefaults → IterableOps
  54. def get[TResult <: BsonValue](key: String)(implicit e: DefaultsTo[TResult, BsonValue], ct: ClassTag[TResult]): Option[TResult]

    Optionally returns the value associated with a key.

    Optionally returns the value associated with a key.

    key

    the key we want to lookup

    returns

    an option value containing the value associated with key in this document, or None if none exists.

    Definition Classes
    BaseDocument
  55. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  56. def getOrElse[B >: BsonValue](key: String, default: CanBeBsonValue): B

    Returns the value associated with a key, or a default value if the key is not contained in the map.

    Returns the value associated with a key, or a default value if the key is not contained in the map.

    B

    the result type of the default computation.

    key

    the key.

    default

    The default value in case no binding for key is found in the Document. This can be any BsonValue type or any native type that has an implicit BsonTransformer in scope.

    returns

    the value associated with key if it exists, otherwise the result of the default computation.

    Definition Classes
    BaseDocument
  57. def getOrElseUpdate[B](key: String, op: => B)(implicit transformer: BsonTransformer[B]): BsonValue

    If given key is already in this document, returns associated value.

    If given key is already in this document, returns associated value.

    Otherwise, computes value from given expression op, stores with key in document and returns that value.

    key

    the key to test

    op

    the computation yielding the value to associate with key, if key is previously unbound.

    returns

    the value associated with key (either previously or as a result of executing the method).

  58. def groupBy[K](f: ((String, BsonValue)) => K): Map[K, Document]
    Definition Classes
    IterableOps
  59. def groupMap[K, B](key: ((String, BsonValue)) => K)(f: ((String, BsonValue)) => B): Map[K, Iterable[B]]
    Definition Classes
    IterableOps
  60. def groupMapReduce[K, B](key: ((String, BsonValue)) => K)(f: ((String, BsonValue)) => B)(reduce: (B, B) => B): Map[K, B]
    Definition Classes
    IterableOps
  61. def grouped(size: Int): Iterator[Document]
    Definition Classes
    IterableOps
  62. def head: (String, BsonValue)
    Definition Classes
    IterableOps
  63. def headOption: Option[(String, BsonValue)]
    Definition Classes
    IterableOps
  64. def init: Document
    Definition Classes
    IterableOps
  65. def inits: Iterator[Document]
    Definition Classes
    IterableOps
  66. def isEmpty: Boolean
    Definition Classes
    IterableOnceOps
  67. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  68. def isTraversableAgain: Boolean
    Definition Classes
    IterableOps → IterableOnceOps
  69. def iterableFactory: IterableFactory[Iterable]
    Definition Classes
    Iterable → IterableOps
  70. def iterator: Iterator[(String, BsonValue)]

    Creates a new iterator over all key/value pairs in this document

    Creates a new iterator over all key/value pairs in this document

    returns

    the new iterator

    Definition Classes
    BaseDocument → IterableOnce
  71. def keySet: Set[String]

    Collects all keys of this document in a set.

    Collects all keys of this document in a set.

    returns

    a set containing all keys of this document.

    Definition Classes
    BaseDocument
  72. def keys: Iterable[String]

    Collects all keys of this document in an iterable collection.

    Collects all keys of this document in an iterable collection.

    returns

    the keys of this document as an iterable.

    Definition Classes
    BaseDocument
  73. def keysIterator: Iterator[String]

    Creates an iterator for all keys.

    Creates an iterator for all keys.

    returns

    an iterator over all keys.

    Definition Classes
    BaseDocument
  74. def knownSize: Int
    Definition Classes
    IterableOnce
  75. def last: (String, BsonValue)
    Definition Classes
    IterableOps
  76. def lastOption: Option[(String, BsonValue)]
    Definition Classes
    IterableOps
  77. def lazyZip[B](that: Iterable[B]): LazyZip2[(String, BsonValue), B, Document.this.type]
    Definition Classes
    Iterable
  78. def map[B](f: ((String, BsonValue)) => (String, BsonValue)): Document
  79. def map[B](f: ((String, BsonValue)) => B): Iterable[B]
    Definition Classes
    StrictOptimizedIterableOps → IterableOps → IterableOnceOps
  80. def max[B >: (String, BsonValue)](implicit ord: Ordering[B]): (String, BsonValue)
    Definition Classes
    IterableOnceOps
  81. def maxBy[B](f: ((String, BsonValue)) => B)(implicit cmp: Ordering[B]): (String, BsonValue)
    Definition Classes
    IterableOnceOps
  82. def maxByOption[B](f: ((String, BsonValue)) => B)(implicit cmp: Ordering[B]): Option[(String, BsonValue)]
    Definition Classes
    IterableOnceOps
  83. def maxOption[B >: (String, BsonValue)](implicit ord: Ordering[B]): Option[(String, BsonValue)]
    Definition Classes
    IterableOnceOps
  84. def min[B >: (String, BsonValue)](implicit ord: Ordering[B]): (String, BsonValue)
    Definition Classes
    IterableOnceOps
  85. def minBy[B](f: ((String, BsonValue)) => B)(implicit cmp: Ordering[B]): (String, BsonValue)
    Definition Classes
    IterableOnceOps
  86. def minByOption[B](f: ((String, BsonValue)) => B)(implicit cmp: Ordering[B]): Option[(String, BsonValue)]
    Definition Classes
    IterableOnceOps
  87. def minOption[B >: (String, BsonValue)](implicit ord: Ordering[B]): Option[(String, BsonValue)]
    Definition Classes
    IterableOnceOps
  88. final def mkString: String
    Definition Classes
    IterableOnceOps
    Annotations
    @inline()
  89. final def mkString(sep: String): String
    Definition Classes
    IterableOnceOps
    Annotations
    @inline()
  90. final def mkString(start: String, sep: String, end: String): String
    Definition Classes
    IterableOnceOps
  91. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  92. def newSpecificBuilder: Builder[(String, BsonValue), Document]
    Attributes
    protected
    Definition Classes
    Document → IterableFactoryDefaults → IterableOps
  93. def nonEmpty: Boolean
    Definition Classes
    IterableOnceOps
    Annotations
    @deprecatedOverriding("nonEmpty is defined as !isEmpty; override isEmpty instead", "2.13.0")
  94. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  95. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  96. def partition(p: ((String, BsonValue)) => Boolean): (Document, Document)
    Definition Classes
    StrictOptimizedIterableOps → IterableOps
  97. def partitionMap[A1, A2](f: ((String, BsonValue)) => Either[A1, A2]): (Iterable[A1], Iterable[A2])
    Definition Classes
    StrictOptimizedIterableOps → IterableOps
  98. def product[B >: (String, BsonValue)](implicit num: Numeric[B]): B
    Definition Classes
    IterableOnceOps
  99. def productElementNames: Iterator[String]
    Definition Classes
    Product
  100. def put[B](key: String, value: B)(implicit transformer: BsonTransformer[B]): Option[BsonValue]

    Adds a new key/value pair to this document and optionally returns previously bound value.

    Adds a new key/value pair to this document and optionally returns previously bound value. If the document already contains a mapping for the key, it will be overridden by the new value.

    key

    the key to update

    value

    the new value

    returns

    an option value containing the value associated with the key before the put operation was executed, or None if key was not defined in the document before.

  101. def reduce[B >: (String, BsonValue)](op: (B, B) => B): B
    Definition Classes
    IterableOnceOps
  102. def reduceLeft[B >: (String, BsonValue)](op: (B, (String, BsonValue)) => B): B
    Definition Classes
    IterableOnceOps
  103. def reduceLeftOption[B >: (String, BsonValue)](op: (B, (String, BsonValue)) => B): Option[B]
    Definition Classes
    IterableOnceOps
  104. def reduceOption[B >: (String, BsonValue)](op: (B, B) => B): Option[B]
    Definition Classes
    IterableOnceOps
  105. def reduceRight[B >: (String, BsonValue)](op: ((String, BsonValue), B) => B): B
    Definition Classes
    IterableOnceOps
  106. def reduceRightOption[B >: (String, BsonValue)](op: ((String, BsonValue), B) => B): Option[B]
    Definition Classes
    IterableOnceOps
  107. def remove(key: String): Option[BsonValue]

    Removes a key from this document, returning the value associated previously with that key as an option.

    Removes a key from this document, returning the value associated previously with that key as an option.

    key

    the key to be removed

    returns

    an option value containing the value associated previously with key, or None if key was not defined in the document before.

  108. def retain(p: (String, BsonValue) => Boolean): Document

    Retains only those mappings for which the predicate p returns true.

    Retains only those mappings for which the predicate p returns true.

    p

    The test predicate

  109. def reversed: Iterable[(String, BsonValue)]
    Attributes
    protected
    Definition Classes
    IterableOnceOps
  110. def scan[B >: (String, BsonValue)](z: B)(op: (B, B) => B): Iterable[B]
    Definition Classes
    IterableOps
  111. def scanLeft[B](z: B)(op: (B, (String, BsonValue)) => B): Iterable[B]
    Definition Classes
    StrictOptimizedIterableOps → IterableOps → IterableOnceOps
  112. def scanRight[B](z: B)(op: ((String, BsonValue), B) => B): Iterable[B]
    Definition Classes
    IterableOps
  113. def size: Int
    Definition Classes
    IterableOnceOps
  114. def sizeCompare(that: Iterable[_]): Int
    Definition Classes
    IterableOps
  115. def sizeCompare(otherSize: Int): Int
    Definition Classes
    IterableOps
  116. final def sizeIs: SizeCompareOps
    Definition Classes
    IterableOps
    Annotations
    @inline()
  117. def slice(from: Int, until: Int): Document
    Definition Classes
    IterableOps → IterableOnceOps
  118. def sliding(size: Int, step: Int): Iterator[Document]
    Definition Classes
    IterableOps
  119. def sliding(size: Int): Iterator[Document]
    Definition Classes
    IterableOps
  120. def span(p: ((String, BsonValue)) => Boolean): (Document, Document)
    Definition Classes
    StrictOptimizedIterableOps → IterableOps → IterableOnceOps
  121. def splitAt(n: Int): (Document, Document)
    Definition Classes
    IterableOps → IterableOnceOps
  122. def stepper[S <: Stepper[_]](implicit shape: StepperShape[(String, BsonValue), S]): S
    Definition Classes
    IterableOnce
  123. final def strictOptimizedCollect[B, C2](b: Builder[B, C2], pf: PartialFunction[(String, BsonValue), B]): C2
    Attributes
    protected[this]
    Definition Classes
    StrictOptimizedIterableOps
    Annotations
    @inline()
  124. final def strictOptimizedConcat[B >: (String, BsonValue), C2](that: IterableOnce[B], b: Builder[B, C2]): C2
    Attributes
    protected[this]
    Definition Classes
    StrictOptimizedIterableOps
    Annotations
    @inline()
  125. final def strictOptimizedFlatMap[B, C2](b: Builder[B, C2], f: ((String, BsonValue)) => IterableOnce[B]): C2
    Attributes
    protected[this]
    Definition Classes
    StrictOptimizedIterableOps
    Annotations
    @inline()
  126. final def strictOptimizedFlatten[B, C2](b: Builder[B, C2])(implicit toIterableOnce: ((String, BsonValue)) => IterableOnce[B]): C2
    Attributes
    protected[this]
    Definition Classes
    StrictOptimizedIterableOps
    Annotations
    @inline()
  127. final def strictOptimizedMap[B, C2](b: Builder[B, C2], f: ((String, BsonValue)) => B): C2
    Attributes
    protected[this]
    Definition Classes
    StrictOptimizedIterableOps
    Annotations
    @inline()
  128. final def strictOptimizedZip[B, C2](that: IterableOnce[B], b: Builder[((String, BsonValue), B), C2]): C2
    Attributes
    protected[this]
    Definition Classes
    StrictOptimizedIterableOps
    Annotations
    @inline()
  129. def stringPrefix: String
    Attributes
    protected[this]
    Definition Classes
    Iterable
    Annotations
    @deprecatedOverriding("Override className instead", "2.13.0")
  130. def sum[B >: (String, BsonValue)](implicit num: Numeric[B]): B
    Definition Classes
    IterableOnceOps
  131. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  132. def tail: Document
    Definition Classes
    IterableOps
  133. def tails: Iterator[Document]
    Definition Classes
    IterableOps
  134. def take(n: Int): Document
    Definition Classes
    IterableOps → IterableOnceOps
  135. def takeRight(n: Int): Document
    Definition Classes
    StrictOptimizedIterableOps → IterableOps
  136. def takeWhile(p: ((String, BsonValue)) => Boolean): Document
    Definition Classes
    IterableOps → IterableOnceOps
  137. def tapEach[U](f: ((String, BsonValue)) => U): Document
    Definition Classes
    StrictOptimizedIterableOps → IterableOps → IterableOnceOps
  138. def to[C1](factory: Factory[(String, BsonValue), C1]): C1
    Definition Classes
    IterableOnceOps
  139. def toArray[B >: (String, BsonValue)](implicit arg0: ClassTag[B]): Array[B]
    Definition Classes
    IterableOnceOps
  140. def toBsonDocument[TDocument](documentClass: Class[TDocument], codecRegistry: CodecRegistry): BsonDocument
    Definition Classes
    BaseDocument → Bson
  141. def toBsonDocument(): BsonDocument
    Definition Classes
    BaseDocument → Bson
  142. final def toBuffer[B >: (String, BsonValue)]: Buffer[B]
    Definition Classes
    IterableOnceOps
    Annotations
    @inline()
  143. def toIndexedSeq: IndexedSeq[(String, BsonValue)]
    Definition Classes
    IterableOnceOps
  144. final def toIterable: Document.this.type
    Definition Classes
    Iterable → IterableOps
  145. def toJson(settings: JsonWriterSettings): String

    Gets a JSON representation of this document using the given JsonWriterSettings.

    Gets a JSON representation of this document using the given JsonWriterSettings.

    settings

    the JSON writer settings

    returns

    a JSON representation of this document

    Definition Classes
    BaseDocument
  146. def toJson(): String

    Gets a JSON representation of this document

    Gets a JSON representation of this document

    returns

    a JSON representation of this document

    Definition Classes
    BaseDocument
  147. def toList: List[(String, BsonValue)]
    Definition Classes
    IterableOnceOps
  148. def toMap[K, V](implicit ev: <:<[(String, BsonValue), (K, V)]): Map[K, V]
    Definition Classes
    IterableOnceOps
  149. def toSeq: Seq[(String, BsonValue)]
    Definition Classes
    IterableOnceOps
  150. def toSet[B >: (String, BsonValue)]: Set[B]
    Definition Classes
    IterableOnceOps
  151. def toString(): String
    Definition Classes
    Iterable → AnyRef → Any
  152. def toVector: Vector[(String, BsonValue)]
    Definition Classes
    IterableOnceOps
  153. def transform[B](f: (String, BsonValue) => B)(implicit transformer: BsonTransformer[B]): Document

    Applies a transformation function to all values contained in this document.

    Applies a transformation function to all values contained in this document. The transformation function produces new values from existing keys associated values.

    f

    the transformation to apply

    returns

    the document itself.

  154. def transpose[B](implicit asIterable: ((String, BsonValue)) => Iterable[B]): Iterable[Iterable[B]]
    Definition Classes
    IterableOps
  155. val underlying: BsonDocument

    The underlying bson document

    The underlying bson document

    Restricted access to the underlying BsonDocument

    Attributes
    protected[scala]
    Definition Classes
    Document → BaseDocument
  156. def unzip[A1, A2](implicit asPair: ((String, BsonValue)) => (A1, A2)): (Iterable[A1], Iterable[A2])
    Definition Classes
    StrictOptimizedIterableOps → IterableOps
  157. def unzip3[A1, A2, A3](implicit asTriple: ((String, BsonValue)) => (A1, A2, A3)): (Iterable[A1], Iterable[A2], Iterable[A3])
    Definition Classes
    StrictOptimizedIterableOps → IterableOps
  158. def update[B](key: String, value: B)(implicit transformer: BsonTransformer[B]): Unit

    Adds a new key/value pair to this map.

    Adds a new key/value pair to this map. If the document already contains a mapping for the key, it will be overridden by the new value.

    key

    The key to update

    value

    The new value

  159. def updated(elems: CanBeBsonElement*): Document

    Creates a new Document consisting of all key/value pairs of the current document plus a new pair of a given key and value.

    Creates a new Document consisting of all key/value pairs of the current document plus a new pair of a given key and value.

    elems

    The key/values to add. This can be any valid (String, BsonValue) pair that can be transformed into a BsonElement via BsonMagnets.CanBeBsonElement implicits and any BsonTransformers that are in scope.

    returns

    A fresh immutable document with the binding from key to value added to the new document.

    Definition Classes
    BaseDocument
  160. def updated[B](key: String, value: B)(implicit transformer: BsonTransformer[B]): Document

    Creates a new Document consisting of all key/value pairs of the current document plus a new pair of a given key and value.

    Creates a new Document consisting of all key/value pairs of the current document plus a new pair of a given key and value.

    key

    The key to add

    value

    The new value

    returns

    A fresh immutable document with the binding from key to value added to the new document.

    Definition Classes
    BaseDocument
  161. def values: Iterable[BsonValue]

    Collects all values of this document in an iterable collection.

    Collects all values of this document in an iterable collection.

    returns

    the values of this document as an iterable.

    Definition Classes
    BaseDocument
  162. def valuesIterator: Iterator[BsonValue]

    Creates an iterator for all values in this document.

    Creates an iterator for all values in this document.

    returns

    an iterator over all values that are associated with some key in this document.

    Definition Classes
    BaseDocument
  163. def view: View[(String, BsonValue)]
    Definition Classes
    IterableOps
  164. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  165. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  166. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  167. def withFilter(p: ((String, BsonValue)) => Boolean): WithFilter[(String, BsonValue), Iterable]
    Definition Classes
    IterableOps
  168. def zip[B](that: IterableOnce[B]): Iterable[((String, BsonValue), B)]
    Definition Classes
    StrictOptimizedIterableOps → IterableOps
  169. def zipAll[A1 >: (String, BsonValue), B](that: Iterable[B], thisElem: A1, thatElem: B): Iterable[(A1, B)]
    Definition Classes
    IterableOps
  170. def zipWithIndex: Iterable[((String, BsonValue), Int)]
    Definition Classes
    StrictOptimizedIterableOps → IterableOps → IterableOnceOps

Deprecated Value Members

  1. def ++:[B >: (String, BsonValue)](that: IterableOnce[B]): Iterable[B]
    Definition Classes
    IterableOps
    Annotations
    @deprecated
    Deprecated

    (Since version 2.13.0) Use ++ instead of ++: for collections of type Iterable

  2. final def /:[B](z: B)(op: (B, (String, BsonValue)) => B): B
    Definition Classes
    IterableOnceOps
    Annotations
    @deprecated @inline()
    Deprecated

    (Since version 2.13.0) Use foldLeft instead of /:

  3. final def :\[B](z: B)(op: ((String, BsonValue), B) => B): B
    Definition Classes
    IterableOnceOps
    Annotations
    @deprecated @inline()
    Deprecated

    (Since version 2.13.0) Use foldRight instead of :\

  4. def aggregate[B](z: => B)(seqop: (B, (String, BsonValue)) => B, combop: (B, B) => B): B
    Definition Classes
    IterableOnceOps
    Annotations
    @deprecated
    Deprecated

    (Since version 2.13.0) aggregate is not relevant for sequential collections. Use foldLeft(z)(seqop) instead.

  5. def companion: IterableFactory[Iterable]
    Definition Classes
    IterableOps
    Annotations
    @deprecated @deprecatedOverriding("Use iterableFactory instead", "2.13.0") @inline()
    Deprecated

    (Since version 2.13.0) Use iterableFactory instead

  6. final def copyToBuffer[B >: (String, BsonValue)](dest: Buffer[B]): Unit
    Definition Classes
    IterableOnceOps
    Annotations
    @deprecated @inline()
    Deprecated

    (Since version 2.13.0) Use dest ++= coll instead

  7. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated
  8. def hasDefiniteSize: Boolean
    Definition Classes
    IterableOnceOps
    Annotations
    @deprecated
    Deprecated

    (Since version 2.13.0) Check .knownSize instead of .hasDefiniteSize for more actionable information (see scaladoc for details)

  9. final def repr: Document
    Definition Classes
    IterableOps
    Annotations
    @deprecated
    Deprecated

    (Since version 2.13.0) Use coll instead of repr in a collection implementation, use the collection value itself from the outside

  10. def seq: Document.this.type
    Definition Classes
    Iterable
    Annotations
    @deprecated
    Deprecated

    (Since version 2.13.0) Iterable.seq always returns the iterable itself

  11. final def toIterator: Iterator[(String, BsonValue)]
    Definition Classes
    IterableOnceOps
    Annotations
    @deprecated @inline()
    Deprecated

    (Since version 2.13.0) Use .iterator instead of .toIterator

  12. final def toStream: Stream[(String, BsonValue)]
    Definition Classes
    IterableOnceOps
    Annotations
    @deprecated @inline()
    Deprecated

    (Since version 2.13.0) Use .to(LazyList) instead of .toStream

  13. final def toTraversable: Traversable[(String, BsonValue)]
    Definition Classes
    IterableOps
    Annotations
    @deprecated
    Deprecated

    (Since version 2.13.0) Use toIterable instead

  14. def view(from: Int, until: Int): View[(String, BsonValue)]
    Definition Classes
    IterableOps
    Annotations
    @deprecated
    Deprecated

    (Since version 2.13.0) Use .view.slice(from, until) instead of .view(from, until)

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from StrictOptimizedIterableOps[(String, BsonValue), Iterable, Document]

Inherited from BaseDocument[Document]

Inherited from Bson

Inherited from Iterable[(String, BsonValue)]

Inherited from IterableFactoryDefaults[(String, BsonValue), Iterable]

Inherited from IterableOps[(String, BsonValue), Iterable, Document]

Inherited from IterableOnceOps[(String, BsonValue), Iterable, Document]

Inherited from IterableOnce[(String, BsonValue)]

Inherited from AnyRef

Inherited from Any

Ungrouped