RedisTimeSeries class

An object that adds support for storing and querying timestamped data points. Backed by the RedisTimeSeries module. https://redis.io/docs/latest/develop/data-types/timeseries/

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

add({required String key, required RedisTimeSeriesTimestamp timestamp, required double value, Duration? retention, RedisTimeSeriesEncoding? encoding, int? chunkSize, RedisTimeSeriesDuplicatePolicy? duplicatePolicy, RedisTimeSeriesDuplicatePolicy? onDuplicate, List<({String label, String value})>? labels}) Future<void>
Append a sample to a time series. Equivalent to the TS.ADD command. Note: When the specified key does not exist, a new time series is created. https://redis.io/commands/ts.add
create({required String key, Duration? retention, RedisTimeSeriesEncoding? encoding, int? chunkSize, RedisTimeSeriesDuplicatePolicy? duplicatePolicy, List<({String label, String value})>? labels}) Future<void>
Create a new time series. Equivalent to the TS.CREATE command. https://redis.io/commands/ts.create
get({required String key}) Future<({DateTime timestamp, double value})?>
Get the sample with the highest timestamp from a given time series. Equivalent to the TS.GET command. Returns a timestamp, value pair of the sample with the highest timestamp. Throws a RedisException if the key does not exist. Returns null if the time series is empty. The returned timestamp will always be UTC. https://redis.io/commands/ts.get
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
range({required String key, required RedisTimeSeriesFromTimestamp from, required RedisTimeSeriesToTimestamp to, List<RedisTimeSeriesTimestamp>? filterByTimestamp, ({double max, double min})? filterByValue, int? count, RedisTimeSeriesAlign? align, RedisTimeSeriesAggregation? aggregation}) Future<List<({DateTime timestamp, double value})>>
Query a range in forward direction. Equivalent to the TS.RANGE command. https://redis.io/commands/ts.range
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited