wire.data.DataSet

Use the DataSet class to combine a data source and a query to create live, interactive connections to data services.

Properties

Name

Type

Default

Description

DataId

string

guid

The unique identifier for the data set. This can be used with data events to listen for changes to the data set.

Events

boolean

true

Determines whether the data set listens for data events. This is often set to false for data sets bound to filters.

Query

object

null

Source

object

null

The wire.data.DataSource object that is the data source.

Transform

function

null

The callback hook for any custom data processing after the data has come back from the data service but before its broadcast to consumers including components listening for changes.

Write

object

null

Sets up the data set to support writing data to a data service. For details, visit Writing Data.

Methods

Name

Description

cast

Static method that casts an object with the same data set properties into an instance of the DataSet class.

data

Returns or sets the data inside the data set.

execAsync

Asynchronous call to execute the query against the data service defined in the data source. Returns a DataPromise but does not add it to the update stack. This data set will not send out updates to the promise if it picks up changes. For details visit, Executing Queries.

execAsyncListen

Functions the same as execAsync except it adds the DataPromise to the update stack. This data set will send out updates to the promise when it picks up changes. For details visit, Executing Queries.

refresh

Forces the data set to re-execute the query in the data set to bring down new data.

table

Helper method for TypeScript defined as IWireDataTable. Returns the data inside the data set. This method assumes the data is a wire.data.DataTable.

write

Writes an array of data to the data service using the configuration in the Write property. For details, visit Writing Data.

For details and examples on data sets, visit Working with DataSets.

Last updated