Document class

Constructors

Document({required Collection collection, String? key, String? id})

Properties

collection Collection
getter/setter pair
data ↔ dynamic
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
id String?
getter/setter pair
key String?
getter/setter pair
rev String?
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

add(Map<String, dynamic> data, {bool? waitForSync, bool? returnNew, bool? returnOld, bool? silent, bool? overwrite}) FutureOr<Document>
Add a document in the collection
allDocuments(String col, {String? type}) FutureOr<Map<String, dynamic>?>
Returns all documents of a collection
delete() FutureOr<void>
Deletes a document
formatUrl(String url, {bool? waitForSync, bool? returnNew, bool? returnOld, bool? silent, bool? overwrite, bool? ignoreRevs, bool? mergeObjects, bool? keepNull}) String
Formats an url for the http request with parameters
get() FutureOr<Document>
Get a document
Returns head
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
replace(Map<String, dynamic> data, {bool? waitForSync, bool? returnNew, bool? returnOld, bool? silent, bool? overwrite}) FutureOr<Document>
Replaces a document
replaceAllDocuments(Map<String, dynamic> data, String col, {bool? waitForSync, bool? returnNew, bool? returnOld, bool? ignoreRevs}) FutureOr<Document>
Replaces all documents
toMap({dynamic separated = false}) Map<String, dynamic>
Returns a Map of the Document itself
toString({dynamic separated = false}) String
A string representation of this object.
override
update(Map<String, dynamic> data, {bool? waitForSync, bool? returnNew, bool? returnOld, bool? silent, bool? overwrite, bool? keepNull}) FutureOr<Document>
Updates a document
updateAllDocuments(Map<String, dynamic> data, String col, {bool? waitForSync, bool? returnNew, bool? returnOld, bool? ignoreRevs, bool? mergeObjects, bool? keepNull}) FutureOr<Document>
Updates all documents

Operators

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