Document

object Document extends SpecificIterableFactory[(String, BsonValue), Document]

The immutable Document companion object for easy creation.

Companion:
class
trait Product
trait Mirror
trait SpecificIterableFactory[(String, BsonValue), Document]
trait Factory[(String, BsonValue), Document]
class Object
trait Matchable
class Any

Type members

Inherited types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Inherited from:
Mirror
type MirroredLabel <: String

The name of the type

The name of the type

Inherited from:
Mirror

Value members

Concrete methods

Create a new Document

Create a new Document

Returns:

a new Document

def apply(json: String): Document

Parses a string in MongoDB Extended JSON format to a Document

Parses a string in MongoDB Extended JSON format to a Document

Value parameters:
json

the JSON stringN

Returns:

a corresponding Document object

See also:

org.bson.json.JsonReader

def apply(elems: CanBeBsonElement*): Document

Create a new document from the elems

Create a new document from the elems

Value parameters:
elems

the key/value pairs that make up the Document. 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 consisting key/value pairs given by elems.

def apply(elems: CanBeBsonElements): Document

Create a new document from the elems

Create a new document from the elems

Value parameters:
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:

a new Document consisting key/value pairs given by elems.

def builder: Builder[(String, BsonValue), Document]

Create a new empty Document

Create a new empty Document

Returns:

a new Document

def fromSeq(ts: Seq[(String, BsonValue)]): Document
override def fromSpecific(it: IterableOnce[(String, BsonValue)]): Document
Definition Classes
Factory
override def newBuilder: Builder[(String, BsonValue), Document]
Definition Classes
SpecificIterableFactory -> Factory

Inherited methods

def fill(n: Int)(elem: => (String, BsonValue)): C
Inherited from:
SpecificIterableFactory

Implicits

Implicits

implicit val codec: Codec[Document]

Inherited implicits

implicit def specificIterableFactory: Factory[A, C]
Inherited from:
SpecificIterableFactory