Class/Object

reactivemongo.bson

BSONDocument

Related Docs: object BSONDocument | package bson

Permalink

case class BSONDocument(stream: Stream[Try[BSONElement]]) extends BSONValue with BSONElementSet with Product with Serializable

A BSONDocument structure (BSON type 0x03).

A BSONDocument is basically a stream of tuples (String, BSONValue). It is completely lazy. The stream it wraps is a Stream[Try[(String, BSONValue)]] since we cannot be sure that a not yet deserialized value will be processed without error.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. BSONDocument
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. BSONElementSet
  7. ElementProducer
  8. Producer
  9. BSONValue
  10. AnyRef
  11. Any
Implicitly
  1. by ExtendedBSONValue
  2. by valueProducer
  3. by any2stringadd
  4. by StringFormat
  5. by Ensuring
  6. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new BSONDocument(stream: Stream[Try[BSONElement]])

    Permalink

Type Members

  1. type SetType = BSONDocument

    Permalink
    Definition Classes
    BSONDocumentBSONElementSet

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from BSONDocument to any2stringadd[BSONDocument] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ++(elements: Producer[BSONElement]*): BSONDocument

    Permalink

    Alias for :~ or merge

  5. def ++(doc: BSONDocument): BSONDocument

    Permalink

    Alias for add(doc: BSONDocument): BSONDocument

  6. def --(keys: String*): BSONDocument

    Permalink

    Alias for remove(names: String*)

  7. def ->[B](y: B): (BSONDocument, B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from BSONDocument to ArrowAssoc[BSONDocument] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  8. def :~(elements: Producer[BSONElement]*): BSONDocument

    Permalink

    Merge the produced elements with this set

    Merge the produced elements with this set

    Definition Classes
    BSONDocumentBSONElementSet
  9. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  10. def as[T](implicit reader: BSONReader[BSONDocument, T]): T

    Permalink
    Implicit information
    This member is added by an implicit conversion from BSONDocument to ExtendedBSONValue[BSONDocument] performed by method ExtendedBSONValue in reactivemongo.bson.BSONValue.
    Definition Classes
    ExtendedBSONValue
  11. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  12. def asOpt[T](implicit reader: BSONReader[BSONDocument, T]): Option[T]

    Permalink
    Implicit information
    This member is added by an implicit conversion from BSONDocument to ExtendedBSONValue[BSONDocument] performed by method ExtendedBSONValue in reactivemongo.bson.BSONValue.
    Definition Classes
    ExtendedBSONValue
  13. def asTry[T](implicit reader: BSONReader[BSONDocument, T]): Try[T]

    Permalink
    Implicit information
    This member is added by an implicit conversion from BSONDocument to ExtendedBSONValue[BSONDocument] performed by method ExtendedBSONValue in reactivemongo.bson.BSONValue.
    Definition Classes
    ExtendedBSONValue
  14. val bson: BSONDocument

    Permalink
    Implicit information
    This member is added by an implicit conversion from BSONDocument to ExtendedBSONValue[BSONDocument] performed by method ExtendedBSONValue in reactivemongo.bson.BSONValue.
    Definition Classes
    ExtendedBSONValue
  15. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  16. val code: Byte

    Permalink

    The code indicating the BSON type for this value

    The code indicating the BSON type for this value

    Definition Classes
    BSONDocumentBSONValue
  17. def contains(key: String): Boolean

    Permalink

    Checks whether the given key is found in this element set.

    Checks whether the given key is found in this element set.

    key

    the key to be found in the document

    returns

    true if the key is found

    Definition Classes
    BSONDocumentBSONElementSet
  18. lazy val elements: Stream[BSONElement]

    Permalink

    Returns a Stream for all the elements of this BSONDocument.

    Returns a Stream for all the elements of this BSONDocument.

    Definition Classes
    BSONDocumentBSONElementSet
  19. def ensuring(cond: (BSONDocument) ⇒ Boolean, msg: ⇒ Any): BSONDocument

    Permalink
    Implicit information
    This member is added by an implicit conversion from BSONDocument to Ensuring[BSONDocument] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  20. def ensuring(cond: (BSONDocument) ⇒ Boolean): BSONDocument

    Permalink
    Implicit information
    This member is added by an implicit conversion from BSONDocument to Ensuring[BSONDocument] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  21. def ensuring(cond: Boolean, msg: ⇒ Any): BSONDocument

    Permalink
    Implicit information
    This member is added by an implicit conversion from BSONDocument to Ensuring[BSONDocument] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  22. def ensuring(cond: Boolean): BSONDocument

    Permalink
    Implicit information
    This member is added by an implicit conversion from BSONDocument to Ensuring[BSONDocument] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  23. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  24. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  25. def formatted(fmtstr: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from BSONDocument to StringFormat[BSONDocument] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  26. def get(key: String): Option[BSONValue]

    Permalink

    Returns the BSONValue associated with the given key.

    Returns the BSONValue associated with the given key. If the key cannot be found, returns None.

    key

    the key to be found in the document

    Definition Classes
    BSONDocumentBSONElementSet
  27. def getAs[T](key: String)(implicit reader: BSONReader[_ <: BSONValue, T]): Option[T]

    Permalink

    Returns the BSONValue associated with the given key, and converts it with the given implicit BSONReader.

    Returns the BSONValue associated with the given key, and converts it with the given implicit BSONReader.

    If there is no matching value, or the value could not be deserialized or converted, returns a None.

    key

    the key to be found in the document

    Note

    When implementing a custom reader, getAsTry must be preferred.

  28. def getAsTry[T](key: String)(implicit reader: BSONReader[_ <: BSONValue, T]): Try[T]

    Permalink

    Returns the BSONValue associated with the given key, and converts it with the given implicit BSONReader.

    Returns the BSONValue associated with the given key, and converts it with the given implicit BSONReader.

    If there is no matching value, or the value could not be deserialized or converted, returns a Failure. The Failure holds a exceptions.DocumentKeyNotFound if the key could not be found.

    key

    the key to be found in the document

  29. def getAsUnflattenedTry[T](key: String)(implicit reader: BSONReader[_ <: BSONValue, T]): Try[Option[T]]

    Permalink

    Returns the BSONValue associated with the given key, and converts it with the given implicit BSONReader.

    Returns the BSONValue associated with the given key, and converts it with the given implicit BSONReader.

    If there is no matching value, returns a Success holding None. If the value could not be deserialized or converted, returns a Failure.

  30. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  31. def getTry(key: String): Try[BSONValue]

    Permalink

    Returns the BSONValue associated with the given key.

    Returns the BSONValue associated with the given key.

    If the key is not found or the matching value cannot be deserialized, returns a Failure. The Failure holds a exceptions.DocumentKeyNotFound if the key could not be found.

    key

    the key to be found in the document

  32. def getUnflattenedTry(key: String): Try[Option[BSONValue]]

    Permalink

    Returns the BSONValue associated with the given key.

    Returns the BSONValue associated with the given key.

    If the key could not be found, the resulting option will be None. If the matching value could not be deserialized, returns a Failure.

    key

    the key to be found in the document

  33. def headOption: Option[BSONElement]

    Permalink

    The first/mandatory nested element, if any

    The first/mandatory nested element, if any

    Definition Classes
    BSONDocumentBSONElementSet
  34. def isEmpty: Boolean

    Permalink

    Indicates whether this element set is empty

    Indicates whether this element set is empty

    Definition Classes
    BSONDocumentBSONElementSet
    Annotations
    @inline()
  35. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  36. def merge(elements: Producer[BSONElement]*): BSONDocument

    Permalink

    Creates a new BSONDocument containing all the elements of this one and the given elements.

  37. def merge(doc: BSONDocument): BSONDocument

    Permalink

    Creates a new BSONDocument containing all the elements of this one and the elements of the given document.

  38. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  39. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  40. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  41. def remove(keys: String*): BSONDocument

    Permalink

    Creates a new BSONDocument without the elements corresponding the given keys.

  42. def seeAsOpt[T](implicit reader: BSONReader[_ <: BSONValue, T]): Option[T]

    Permalink
    Implicit information
    This member is added by an implicit conversion from BSONDocument to ExtendedBSONValue[BSONDocument] performed by method ExtendedBSONValue in reactivemongo.bson.BSONValue.
    Definition Classes
    ExtendedBSONValue
  43. def seeAsTry[T](implicit reader: BSONReader[_ <: BSONValue, T]): Try[T]

    Permalink
    Implicit information
    This member is added by an implicit conversion from BSONDocument to ExtendedBSONValue[BSONDocument] performed by method ExtendedBSONValue in reactivemongo.bson.BSONValue.
    Definition Classes
    ExtendedBSONValue
  44. def size: Int

    Permalink

    The number of elements

    The number of elements

    Definition Classes
    BSONDocumentBSONElementSet
    Annotations
    @inline()
  45. val stream: Stream[Try[BSONElement]]

    Permalink
  46. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  47. def toMap: Map[String, BSONValue]

    Permalink

    Returns a Map representation for this element set.

    Returns a Map representation for this element set.

    Definition Classes
    BSONElementSet
  48. def toString(): String

    Permalink
    Definition Classes
    BSONDocument → AnyRef → Any
  49. def values: Stream[BSONValue]

    Permalink

    Returns the values for the nested elements.

    Returns the values for the nested elements.

    Definition Classes
    BSONDocumentBSONElementSet
  50. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  51. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  52. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  53. def ~:(elements: Producer[BSONElement]): BSONDocument

    Permalink

    Merge the produced elements at the beginning of this set

    Merge the produced elements at the beginning of this set

    Definition Classes
    BSONDocumentBSONElementSet
  54. def [B](y: B): (BSONDocument, B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from BSONDocument to ArrowAssoc[BSONDocument] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Deprecated Value Members

  1. def add(elements: Producer[BSONElement]*): BSONDocument

    Permalink
    Annotations
    @deprecated
    Deprecated

    (Since version 0.12.0) Use merge

  2. def add(doc: BSONDocument): BSONDocument

    Permalink
    Annotations
    @deprecated
    Deprecated

    (Since version 0.12.0) Use merge

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from BSONElementSet

Inherited from ElementProducer

Inherited from Producer[BSONElement]

Inherited from BSONValue

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion ExtendedBSONValue from BSONDocument to ExtendedBSONValue[BSONDocument]

Inherited by implicit conversion valueProducer from BSONDocument to OptionValueProducer

Inherited by implicit conversion any2stringadd from BSONDocument to any2stringadd[BSONDocument]

Inherited by implicit conversion StringFormat from BSONDocument to StringFormat[BSONDocument]

Inherited by implicit conversion Ensuring from BSONDocument to Ensuring[BSONDocument]

Inherited by implicit conversion ArrowAssoc from BSONDocument to ArrowAssoc[BSONDocument]

Ungrouped