DataItemProxy

One data item in a collection, consisting of key-value pairs


Constructors

new DataItemProxy()

new DataItemProxy(
   primaryKey, 
   collection, 
   client): DataItemProxy

Parameters

ParameterTypeDescription
primaryKeystringThe current primary key of the data item. This may change if the fields on the data item change, rendering this proxy inoperable.
collectionCollectionProxyThe collection that contains this data item.
clientEditorClient

Returns

DataItemProxy


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