TSREM

Synopsis

TSREM key timestamp [timestamp ...]

This command removes one or more specified timestamps from the time series that is associated with the given key.

  • If the key exists, but is not of time series type, an error is raised.
  • If the given timestamp is not a valid signed 64 bit integer, an error is raised.
  • If the provided timestamps don't exist, TSREM still returns "OK". As a result, TSREM just ensures the provided timestamps no longer exist, but doesn't provide any information about whether they existed before the command was run.

Return value

Returns the appropriate status string.

Examples

The timestamp can be arbitrary integers used just for sorting values in a certain order.

TSADD ts_key 1 one 2 two 3 three 4 four 5 five 6 six
"OK"
TSGET ts_key 2
"two"
TSGET ts_key 3
"three"
TSRANGEBYTIME ts_key 1 4
1) "1"
2) "one"
3) "2"
4) "two"
5) "3"
6) "three"
7) "4"
8) "four"
TSREM ts_key 2 3
"OK"
TSRANGEBYTIME ts_key 1 4
1) "1"
2) "one"
3) "4"
4) "four"
TSGET ts_key 2
(nil)
TSGET ts_key 3
(nil)

See also

tsadd, tsget, tsrangebytime, tsrangebytime, tslastn, tscard