One data item in a collection, consisting of key-value pairs
Constructors
new DataItemProxy()
new DataItemProxy(
primaryKey,
collection,
client): DataItemProxy
Parameters
Parameter | Type | Description |
---|---|---|
primaryKey | string | The current primary key of the data item. This may change if the fields on the data item change, rendering this proxy inoperable. |
collection | CollectionProxy | The collection that contains this data item. |
client | EditorClient |
Returns
Properties
collection
readonly collection: CollectionProxy;
The collection that contains this data item.
fields
readonly fields: MapProxy<string, SerializedFieldType>;
The fields on this data item, organized by their name.
primaryKey
readonly primaryKey: string;
The current primary key of the data item. This may change if the fields on the data item change, rendering this proxy inoperable.
Methods
exists()
exists(): boolean
Returns
boolean
True if a data item exists in this collection at this primary key