TSCARD
Synopsis
TSCARD key
This command returns the number of entires in the given time series.
- If the given
key
is associated with non-timeseries data, an error is raised. - If the given
key
is not associated with any data, 0 is returned.
Return value
Returns the number of entries in the given time series.
Examples
$ TSADD ts_key 10 v1 20 v2 30 v3 40 v4 50 v5
"OK"
$ TSCARD ts_key
(integer) 5
$ TSADD ts_key1 10 v1 20 v2 30 v3
"OK"
$ TSCARD ts_key1
(integer) 3
Non-existent key returns 0.
$ TSCARD ts_key2
(integer) 0
See also
tsadd
, tsget
, tsrem
,
tsrangebytime
, tsrevrangebytime
,
tslastn