struct Redis::TimeSeries(Runnable)

Overview

Time-series support for Redis using the RedisTimeSeries module.

require "redis"
require "redis/time_series"

EXPERIMENTAL Support for the Redis TimeSeries module is subject to change.

Defined in:

time_series.cr

Instance Method Summary

Instance Method Detail

def add(key : String, value : Float64 | Int64, retention : Time::Span | Nil = nil, encoding : Encoding | Nil = nil, chunk_size : Int64 | Nil = nil, on_duplicate duplicate_policy : DuplicatePolicy | Nil = nil, labels : Hash(String, String | Int32 | Int64) | Nil = nil) #

[View source]
def add(key : String, timestamp : Time, value : Float64 | Int64, retention : Time::Span | Nil = nil, encoding : Encoding | Nil = nil, chunk_size : Int64 | Nil = nil, on_duplicate duplicate_policy : DuplicatePolicy | Nil = nil, labels : Hash(String, String | Int32 | Int64) | Nil = nil) #

[View source]
def aggregation(aggregator : AggregationType, bucket_duration : Time::Span, align : Alignment | Time | Nil = nil, buckettimestamp : BucketTimestamp | Nil = nil, empty : Bool | Nil = nil) #

[View source]
def create(key : String, retention : Time::Span | Nil = nil, encoding : Encoding | Nil = nil, chunk_size : Int64 | Nil = nil, duplicate_policy : DuplicatePolicy | Nil = nil, labels : Hash(String, String | Int32 | Int64) | Nil = nil) #

[View source]
def get(key : String) #

[View source]
def info(key : String) #

[View source]
def mrange(time_range : ::Range(Time, Time | Nil), filter : String, filter_by_ts : Enumerable(Time) | Nil = nil, filter_by_value : ::Range(Float64, Float64) | Nil = nil, withlabels : Bool | Nil = nil, selected_labels : Enumerable(String) | Nil = nil, count : Int | Nil = nil, aggregation : Aggregation | Nil = nil, groupby : String | Nil = nil, reduce : String | Nil = nil) #

[View source]
def mrange(time_range : ::Range(Time, Time | Nil), filter : Array(String), filter_by_ts : Enumerable(Time) | Nil = nil, filter_by_value : ::Range(Float64, Float64) | Nil = nil, withlabels : Bool | Nil = nil, selected_labels : Enumerable(String) | Nil = nil, count : Int | Nil = nil, aggregation : Aggregation | Nil = nil, groupby : String | Nil = nil, reduce : String | Nil = nil) #

[View source]
def queryindex(filter : String) #

[View source]
def range(key : String, time_range : ::Range(Time, Time), & : RangeOptions -> ) #

[View source]