Document class

Couchbase Lite document. The Document is immutable.

Implementers

Constructors

Document([Map data, String id ])

Properties

id String
The document's ID.
read-only
hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

contains(String key) bool
Tests whether a property exists or not. This can be less expensive than value(forKey:), because it does not have to allocate an object for the property value. [...]
count() int
The number of properties in the document.
getArray<T>(String key) List<T>
Get a property's value as a List Object, which is a mapping object of an array value. Returns null if the property doesn't exists, or its value is not an array. [...]
getBoolean(String key) bool
Gets a property's value as a boolean value. Returns true if the value exists, and is either true or a nonzero number. [...]
getDouble(String key) double
Gets a property's value as a double value. Integers will be converted to double. The value true is returned as 1.0, false as 0.0. Returns 0.0 if the property doesn't exist or does not have a numeric value. [...]
getInt(String key) int
Gets a property's value as an int value. Floating point values will be rounded. The value true is returned as 1, false as 0. Returns 0 if the property doesn't exist or does not have a numeric value. [...]
getKeys() List<String>
An array containing all keys, or an empty array if the document has no properties.
getList<T>(String key) List<T>
Get a property's value as a List Object, which is a mapping object of an array value. Returns null if the property doesn't exists, or its value is not an array. [...]
getMap<K, V>(String key) Map<K, V>
Get a property's value as a Map Object, which is a mapping object of a dictionary value. Returns null if the property doesn't exists, or its value is not a dictionary. [...]
getString(String key) String
Gets a property's value as a string. Returns null if the property doesn't exist, or its value is not a string. [...]
getValue(String key) Object
Gets a property's value. The value types are Blob, ArrayObject, DictionaryObject, Number, or String based on the underlying data type; or null if the value is null or the property doesn't exist. [...]
toMap() Map<String, dynamic>
Gets content of the current object as a Dictionary. [...]
toMutable() MutableDocument
Returns a mutable copy of the document. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) bool
The equality operator. [...]
inherited