hisRead method

Future<HGrid> hisRead(
  1. HRef id,
  2. Object range
)

/////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////// Read history time-series data for given record and time range.

The items returned are exclusive of start time and inclusive of end time. Raise exception if id does not map to a record with the required tags "his" or "tz". The range may be either a String or a HDateTimeRange. If HTimeDateRange is passed then must match the timezone configured on the history record. Otherwise if a String is passed, it is resolved relative to the history record's timezone.

Implementation

// History
//////////////////////////////////////////////////////////////////////////

  /// Read history time-series data for given record and time range.
  ///
  /// The items returned are exclusive of start time and inclusive of end time.
  /// Raise exception if id does not map to a record with the required tags
  /// "his" or "tz".  The range may be either a String or a HDateTimeRange.
  /// If HTimeDateRange is passed then must match the timezone configured on
  /// the history record.  Otherwise if a String is passed, it is resolved
  /// relative to the history record's timezone.
  Future<HGrid> hisRead(HRef id, Object range) {
    var b = HGridBuilder();
    b.addCol("id");
    b.addCol("range");
    b.addRow([id, HStr(range.toString())]);

    return call("hisRead", b.toGrid());
  }