Skip to content

Commit ac672ca

Browse files
Update add-mod-del.md
1 parent 3807a7a commit ac672ca

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/ds/ts/add-mod-del.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
To add new samples to a time series, use the `TS.ADD` and `TS.MADD` commands. Note that if the series does not exist, it will be automatically created.
44

5-
```redis Add data points to a time series
5+
```redis:[run_confirmation=true] Add data points to a time series
66
TS.ADD // adds a new data point
77
bike_sales_1 // new key name
88
1000 // timestamp, simplified for these examples
@@ -29,7 +29,7 @@ TS.MGET FILTER region=east // returns the last sample from all time series with
2929

3030
You can also add to or update an existing time series using the `TS.ADD` command.
3131

32-
```redis Update a time series sample
32+
```redis:[run_confirmation=true] Update a time series sample
3333
TS.ADD // use TS.ADD to update an existing sample
3434
bike_sales_1 // key name for the time series you would like to update
3535
1000 // existing timestamp
@@ -39,7 +39,7 @@ TS.ADD // use TS.ADD to update an existing sample
3939

4040
To delete samples, specify the interval (inclusive) between two timestamps for a given time series.
4141

42-
```redis Delete
42+
```redis:[run_confirmation=true] Delete
4343
TS.DEL bike_sales_1 999 1000 // deletes all the data points between two timestamps (inclusive)
4444
4545
TS.DEL bike_sales_2 1000 1000 // to delete a single timestamp, use it as both the "from" and the "to" timestamp
@@ -49,12 +49,12 @@ TS.DEL bike_sales_2 1000 1000 // to delete a single timestamp, use it as both th
4949

5050
Increase (`TS.INCRBY`) or decrease (`TS.DECRBY`) the value of the sample with the maximum existing timestamp, or create a new sample with a value equal to the value of the sample with the maximum existing timestamp with a given increment.
5151

52-
```redis TS.INCRBY example
52+
```redis:[run_confirmation=true] TS.INCRBY example
5353
TS.INCRBY bike_sales_3 1 // increases the latest sample by one to 173
5454
TS.GET bike_sales_3
5555
```
5656

57-
```redis TS.DECRBY example
57+
```redis:[run_confirmation=true] TS.DECRBY example
5858
TS.DECRBY bike_sales_3 1 // decreases the latest sample by one to 172
5959
TS.GET bike_sales_3
6060
```
@@ -63,4 +63,4 @@ See the `TS.INCRBY` and `TS.DECRBY` command pages for more information about the
6363

6464
### Delete time series
6565

66-
Use the `DEL` command to delete one or more time series.
66+
Use the `DEL` command to delete one or more time series.

0 commit comments

Comments
 (0)