Class/Object

reactivemongo.api.bson

BSONDocument

Related Docs: object BSONDocument | package bson

Permalink

sealed abstract class BSONDocument extends BSONValue with ElementProducer with BSONDocumentLowPriority

A BSONDocument structure (BSON type 0x03).

A BSONDocument is basically a set of fields (String, BSONValue).

Note: The insertion/initial order of the fields may not be maintained through the operations.

Self Type
BSONDocument
Linear Supertypes
BSONDocumentLowPriority, ElementProducer, Producer[BSONElement], BSONValue, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. BSONDocument
  2. BSONDocumentLowPriority
  3. ElementProducer
  4. Producer
  5. BSONValue
  6. AnyRef
  7. Any
Implicitly
  1. by identityValueProducer
  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

Abstract Value Members

  1. abstract def elements: Seq[BSONElement]

    Permalink

    The document fields as a sequence of BSONElements.

  2. abstract def headOption: Option[BSONElement]

    Permalink

    The first/mandatory element, if any

  3. abstract def isEmpty: Boolean

    Permalink

    Indicates whether this document is empty

Concrete 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. final def ++(seq: BSONElement*): BSONDocument

    Permalink

    Creates a new BSONDocument containing all the elements of this one and the specified element sequence.

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

    Permalink

    Returns the BSONDocument containing all the elements of this one and the elements of the given document.

  6. def ++(producers: ElementProducer*): BSONDocument

    Permalink

    Creates a new BSONDocument containing all the elements of this one and the specified element producers.

    Creates a new BSONDocument containing all the elements of this one and the specified element producers.

    Definition Classes
    BSONDocumentLowPriority
  7. final def --(keys: String*): BSONDocument

    Permalink

    Returns a set without the values corresponding to the specified keys.

  8. 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()
  9. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  10. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  11. final def asOpt[T](implicit reader: BSONReader[T]): Option[T]

    Permalink

    Optionally parses this value as a T one.

    Optionally parses this value as a T one.

    returns

    Some successfully parsed value, or None if fails

    import scala.util.Try
    import reactivemongo.api.bson.BSONValue
    def foo(v: BSONValue): Option[String] = v.asOpt[String]
    Definition Classes
    BSONValue
  12. final def asTry[T](implicit reader: BSONReader[T]): Try[T]

    Permalink

    Tries to parse this value as a T one.

    Tries to parse this value as a T one.

    import scala.util.Try
    import reactivemongo.api.bson.BSONValue
    
    def foo(v: BSONValue): Try[String] = v.asTry[String]
    Definition Classes
    BSONValue
  13. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  14. final 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
  15. 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

  16. 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
  17. 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
  18. 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
  19. 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
  20. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  21. def equals(that: Any): Boolean

    Permalink
    Definition Classes
    BSONDocument → AnyRef → Any
  22. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  23. 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()
  24. final 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

  25. final def getAsOpt[T](key: String)(implicit reader: BSONReader[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.

  26. final def getAsTry[T](key: String)(implicit reader: BSONReader[T]): Try[T]

    Permalink

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

    Gets 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 may hold a exceptions.BSONValueNotFoundException, if the key could not be found.

    key

    the key to be found in the document

  27. final def getAsUnflattenedTry[T](key: String)(implicit reader: BSONReader[T]): Try[Option[T]]

    Permalink

    Gets the BSONValue at the given key, and converts it with the given implicit BSONReader.

    Gets the BSONValue at the given key, and converts it with the given implicit BSONReader.

    If there is no matching value, Success(None) is returned. If there is a value, it must be valid or a Failure is returned.

    key

    the key to be found in the document

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

    Permalink
    Definition Classes
    AnyRef → Any
  29. def hashCode(): Int

    Permalink
    Definition Classes
    BSONDocument → AnyRef → Any
  30. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  31. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  34. def size: Int

    Permalink

    The number of fields

    The number of fields

    Annotations
    @inline()
  35. final def synchronized[T0](arg0: ⇒ T0): T0

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

    Permalink

    Returns the map representation for this document.

    Returns the map representation for this document.

    Annotations
    @inline()
  37. def toString(): String

    Permalink
    Definition Classes
    BSONDocument → AnyRef → Any
  38. final def values: Iterable[BSONValue]

    Permalink

    Returns the values of the document fields.

  39. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  42. 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

Inherited from BSONDocumentLowPriority

Inherited from ElementProducer

Inherited from Producer[BSONElement]

Inherited from BSONValue

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion identityValueProducer from BSONDocument to Producer[BSONValue]

Inherited by implicit conversion valueProducer from BSONDocument to Producer[BSONValue]

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