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.

Type Hierarchy
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. All

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[org.mongodb.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[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  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
  32. def copyToArray[B >: (String, BsonValue)](xs: Array[B]): Int
    Definition Classes
    IterableOnceOps
  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 finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  46. def find(p: ((String, BsonValue)) => Boolean): Option[(String, BsonValue)]
    Definition Classes
    IterableOnceOps
  47. def flatMap[B](f: ((String, BsonValue)) => IterableOnce[B]): Iterable[B]
    Definition Classes
    StrictOptimizedIterableOps → IterableOps → IterableOnceOps
  48. def flatten[B](implicit toIterableOnce: ((String, BsonValue)) => IterableOnce[B]): Iterable[B]
    Definition Classes
    StrictOptimizedIterableOps → IterableOps → IterableOnceOps
  49. def fold[A1 >: (String, BsonValue)](z: A1)(op: (A1, A1) => A1): A1
    Definition Classes
    IterableOnceOps
  50. def foldLeft[B](z: B)(op: (B, (String, BsonValue)) => B): B
    Definition Classes
    IterableOnceOps
  51. def foldRight[B](z: B)(op: ((String, BsonValue), B) => B): B
    Definition Classes
    IterableOnceOps
  52. def forall(p: ((String, BsonValue)) => Boolean): Boolean
    Definition Classes
    IterableOnceOps
  53. 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
  54. def fromSpecific(coll: IterableOnce[(String, BsonValue)]): Document
    Attributes
    protected
    Definition Classes
    Document → IterableFactoryDefaults → IterableOps
  55. 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
  56. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  57. 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
  58. 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).

  59. def groupBy[K](f: ((String, BsonValue)) => K): Map[K, Document]
    Definition Classes
    IterableOps
  60. def groupMap[K, B](key: ((String, BsonValue)) => K)(f: ((String, BsonValue)) => B): Map[K, Iterable[B]]
    Definition Classes
    IterableOps
  61. def groupMapReduce[K, B](key: ((String, BsonValue)) => K)(f: ((String, BsonValue)) => B)(reduce: (B, B) => B): Map[K, B]
    Definition Classes
    IterableOps
  62. def grouped(size: Int): Iterator[Document]
    Definition Classes
    IterableOps
  63. def head: (String, BsonValue)
    Definition Classes
    IterableOps
  64. def headOption: Option[(String, BsonValue)]
    Definition Classes
    IterableOps
  65. def init: Document
    Definition Classes
    IterableOps
  66. def inits: Iterator[Document]
    Definition Classes
    IterableOps
  67. def isEmpty: Boolean
    Definition Classes
    IterableOnceOps
  68. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  69. def isTraversableAgain: Boolean
    Definition Classes
    IterableOps → IterableOnceOps
  70. def iterableFactory: IterableFactory[Iterable]
    Definition Classes
    Iterable → IterableOps
  71. 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
  72. 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
  73. 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
  74. 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
  75. def knownSize: Int
    Definition Classes
    IterableOnce
  76. def last: (String, BsonValue)
    Definition Classes
    IterableOps
  77. def lastOption: Option[(String, BsonValue)]
    Definition Classes
    IterableOps
  78. def lazyZip[B](that: Iterable[B]): LazyZip2[(String, BsonValue), B, Document.this.type]
    Definition Classes
    Iterable
  79. def map[B](f: ((String, BsonValue)) => (String, BsonValue)): Document
  80. def map[B](f: ((String, BsonValue)) => B): Iterable[B]
    Definition Classes
    StrictOptimizedIterableOps → IterableOps → IterableOnceOps
  81. def max[B >: (String, BsonValue)](implicit ord: Ordering[B]): (String, BsonValue)
    Definition Classes
    IterableOnceOps
  82. def maxBy[B](f: ((String, BsonValue)) => B)(implicit cmp: Ordering[B]): (String, BsonValue)
    Definition Classes
    IterableOnceOps
  83. def maxByOption[B](f: ((String, BsonValue)) => B)(implicit cmp: Ordering[B]): Option[(String, BsonValue)]
    Definition Classes
    IterableOnceOps
  84. def maxOption[B >: (String, BsonValue)](implicit ord: Ordering[B]): Option[(String, BsonValue)]
    Definition Classes
    IterableOnceOps
  85. def min[B >: (String, BsonValue)](implicit ord: Ordering[B]): (String, BsonValue)
    Definition Classes
    IterableOnceOps
  86. def minBy[B](f: ((String, BsonValue)) => B)(implicit cmp: Ordering[B]): (String, BsonValue)
    Definition Classes
    IterableOnceOps
  87. def minByOption[B](f: ((String, BsonValue)) => B)(implicit cmp: Ordering[B]): Option[(String, BsonValue)]
    Definition Classes
    IterableOnceOps
  88. def minOption[B >: (String, BsonValue)](implicit ord: Ordering[B]): Option[(String, BsonValue)]
    Definition Classes
    IterableOnceOps
  89. final def mkString: String
    Definition Classes
    IterableOnceOps
    Annotations
    @inline()
  90. final def mkString(sep: String): String
    Definition Classes
    IterableOnceOps
    Annotations
    @inline()
  91. final def mkString(start: String, sep: String, end: String): String
    Definition Classes
    IterableOnceOps
  92. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  93. def newSpecificBuilder: Builder[(String, BsonValue), Document]
    Attributes
    protected
    Definition Classes
    Document → IterableFactoryDefaults → IterableOps
  94. def nonEmpty: Boolean
    Definition Classes
    IterableOnceOps
    Annotations
    @deprecatedOverriding("nonEmpty is defined as !isEmpty; override isEmpty instead", "2.13.0")
  95. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  96. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  97. def partition(p: ((String, BsonValue)) => Boolean): (Document, Document)
    Definition Classes
    StrictOptimizedIterableOps → IterableOps
  98. def partitionMap[A1, A2](f: ((String, BsonValue)) => Either[A1, A2]): (Iterable[A1], Iterable[A2])
    Definition Classes
    StrictOptimizedIterableOps → IterableOps
  99. def product[B >: (String, BsonValue)](implicit num: Numeric[B]): B
    Definition Classes
    IterableOnceOps
  100. def productElementNames: Iterator[String]
    Definition Classes
    Product
  101. 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.

  102. def reduce[B >: (String, BsonValue)](op: (B, B) => B): B
    Definition Classes
    IterableOnceOps
  103. def reduceLeft[B >: (String, BsonValue)](op: (B, (String, BsonValue)) => B): B
    Definition Classes
    IterableOnceOps
  104. def reduceLeftOption[B >: (String, BsonValue)](op: (B, (String, BsonValue)) => B): Option[B]
    Definition Classes
    IterableOnceOps
  105. def reduceOption[B >: (String, BsonValue)](op: (B, B) => B): Option[B]
    Definition Classes
    IterableOnceOps
  106. def reduceRight[B >: (String, BsonValue)](op: ((String, BsonValue), B) => B): B
    Definition Classes
    IterableOnceOps
  107. def reduceRightOption[B >: (String, BsonValue)](op: ((String, BsonValue), B) => B): Option[B]
    Definition Classes
    IterableOnceOps
  108. 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.

  109. 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

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

    Returns a copy of the underlying BsonDocument

    Returns a copy of the underlying BsonDocument

    Definition Classes
    BaseDocument
  143. final def toBuffer[B >: (String, BsonValue)]: Buffer[B]
    Definition Classes
    IterableOnceOps
    Annotations
    @inline()
  144. def toIndexedSeq: IndexedSeq[(String, BsonValue)]
    Definition Classes
    IterableOnceOps
  145. final def toIterable: Document.this.type
    Definition Classes
    Iterable → IterableOps
  146. 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
  147. 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
  148. def toList: List[(String, BsonValue)]
    Definition Classes
    IterableOnceOps
  149. def toMap[K, V](implicit ev: <:<[(String, BsonValue), (K, V)]): Map[K, V]
    Definition Classes
    IterableOnceOps
  150. def toSeq: Seq[(String, BsonValue)]
    Definition Classes
    IterableOnceOps
  151. def toSet[B >: (String, BsonValue)]: Set[B]
    Definition Classes
    IterableOnceOps
  152. def toString(): String
    Definition Classes
    Iterable → AnyRef → Any
  153. def toVector: Vector[(String, BsonValue)]
    Definition Classes
    IterableOnceOps
  154. 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.

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

    The underlying bson document

    The underlying bson document

    Restricted access to the underlying BsonDocument

    Attributes
    protected[org.mongodb.scala]
    Definition Classes
    Document → BaseDocument
  157. def unzip[A1, A2](implicit asPair: ((String, BsonValue)) => (A1, A2)): (Iterable[A1], Iterable[A2])
    Definition Classes
    StrictOptimizedIterableOps → IterableOps
  158. def unzip3[A1, A2, A3](implicit asTriple: ((String, BsonValue)) => (A1, A2, A3)): (Iterable[A1], Iterable[A2], Iterable[A3])
    Definition Classes
    StrictOptimizedIterableOps → IterableOps
  159. 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

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

  8. 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

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

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

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

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

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

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

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

    (Since version 2.13.0) Use toIterable instead

  13. 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 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