API Reference 0.5.2dqueryData

Data class

The interface for accessing element data.

class Data {
 
 final _DQuery _dq;
 
 Data._(this._dq);
 
 /** Retrieve the entire space of element data.
  */
 Map space() => _dq.isEmpty ? null : _dataUser.getSpace(_dq.first);
 
 /** Retrieve the data of the given [key].
  */
 get(String key) => _dq.isEmpty ? null : space()[key];
 
 /** Set the data of the given [key].
  */
 void set(String key, value) => 
     _dq.forEach((t) => _dataUser.set(t, key, value));
 
 /** Delete the data of the given [key].
  */
 void remove(String key) =>
     _dq.forEach((t) => _dataUser.remove(t, key: key));
 
}

Methods

dynamic get(String key) #

Retrieve the data of the given key.

get(String key) => _dq.isEmpty ? null : space()[key];

void remove(String key) #

Delete the data of the given key.

void remove(String key) =>
   _dq.forEach((t) => _dataUser.remove(t, key: key));

void set(String key, value) #

Set the data of the given key.

void set(String key, value) => 
   _dq.forEach((t) => _dataUser.set(t, key, value));

Map space() #

Retrieve the entire space of element data.

Map space() => _dq.isEmpty ? null : _dataUser.getSpace(_dq.first);