MongoDocument class

A representation of a document as a Map

Constructors

MongoDocument(Map<String, Object?>? map)
Creates a Document instance initialized with the given map. or an empty Document instance if not provided.
MongoDocument.single(String key, dynamic value)
Create a Document instance initialized with the given key/value pair.

Properties

hashCode int
The hash code for this object.
no setterinherited
map Map<String, Object?>
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

append(String key, Object value) MongoDocument
Put the given key/value pair into this Document and return this. Useful for chaining puts in a single expression, e.g. doc.append("a", 1).append("b", 2)
get(String key) → dynamic
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() String
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

fixMapMismatchedTypes(Map map) → dynamic
parse(dynamic data) MongoDocument
Parses a string in MongoDB Extended JSON format to a Document