TSREM
AttentionThis page documents an earlier version. Go to the latest (v2.1)version.
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 justensures the provided timestamps no longer exist, but doesn’t provide any information about whetherthey 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
当前内容版权归 YugabyteDB 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 YugabyteDB .