Readonly
mutableThe (mutable) document this path belongs to.
Readonly
pathThe full document path so far.
Returns the value at the previously specified key in the document as a
AttachmentToken if possible, otherwise returns null
.
Returns the value at the previously specified key in the document as a
MutableCounter if possible, otherwise returns null
.
Returns the value at the previously specified key in the document as a
MutableRegister if possible, otherwise returns null
.
Returns the value at the previously specified key in the document as a
MutableRGA if possible, otherwise returns null
.
RGA usage should be replaced. Use arrays inside Registers instead.
Traverses the document with the key-path represented by the receiver and returns the corresponding object or value.
Returns a new mutable document path instance with the passed in key-path or index appended.
A key-path can be a single property name or multiple property names separated by a dot. Indexes can also be specified as part of the key path using square brackets syntax. The empty string returns a document path representing the same portion of the document as the receiver. If a key path starts with a property name and is prefixed by a dot, the dot is ignored.
Examples:
mutableDocumentPath.at('mileage')
mutableDocumentPath.at('driver.name')
mutableDocumentPath.at('passengers[2]')
mutableDocumentPath.at('passengers[2].belongings[1].kind')
mutableDocumentPath.at('.mileage')
Sets a value at the document's key-path defined by the receiver.
Optional
isDefault: booleanRepresents whether or not the value should be set as a
default value. Set this to true
if you want to set a default value that
you expect to be overwritten by other devices in the network. The default
value is false
.
Mutable version of DocumentPath allowing you to mutate a document at a specific key-path. You don't create a
MutableDocumentPath
directly but obtain one via the path property or the at() method of MutableDocument.