Skip to main content

CollectionData

view on npm

A piece of data belonging to a collection

.id : string

The internal id of the state with an instance prefix

.instanceId : string

The internal id of the state with an instance prefix

.value : DataType

Get the value of the data instance

.shallowValue : DataType

Get the shallow value of the data instance (no foreign key values injected)

.set(value) ⇒ this

Set the value of the data instance

Returns: this

The data instance

ParamTypeDescription
valueDataType

The value to set

.patch(value) ⇒ this

Patch the current value of the state

Returns: this

The data instance

ParamTypeDescription
valueDataType

A value of the state to merge with the current value

.delete() ⇒ this

Delete the data instance

Returns: this

The data instance

.clean() ⇒ this

Clean this data instance (remove all watchers & remove the state from the instance)

Returns: this

The data instance