Skip to content

Commit a4d8c8e

Browse files
Update load.md
1 parent 06b8832 commit a4d8c8e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/tf/load.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
When creating a new library you add the code to Redis using the `TFUNCTION LOAD` command.
22
The code needs to contain a preamble that defines which engine is used, the name of the library, and the minimum API version to use.
33

4-
```redis Upload library
4+
```redis:[run_confirmation=true] Upload library
55
TFUNCTION LOAD
66
"#!js name=myFirstLibrary api_version=1.0\n
77
redis.registerFunction('hello', ()=>{
@@ -17,7 +17,7 @@ TFUNCTION LIST
1717

1818
Execute the function that was uploaded.
1919

20-
```redis Execute function
20+
```redis:[run_confirmation=true] Execute function
2121
TFCALL // TFCALL for running sync functions, TFCALLASYNC for async
2222
myFirstLibrary.hello // the name of the library.function
2323
0 // the number of keys provided as arguments
@@ -27,7 +27,7 @@ You can pass arguments to your functions when executing them. In the following e
2727

2828
To update the library, add the `REPLACE` option to the `LOAD` command.
2929

30-
```redis Replace the library
30+
```redis:[run_confirmation=true] Replace the library
3131
TFUNCTION LOAD REPLACE // The replace flag is added when the library already exist
3232
"#!js name=myFirstLibrary api_version=1.0\n
3333
redis.registerFunction('hello', (client, arg)=>{
@@ -37,7 +37,7 @@ TFUNCTION LOAD REPLACE // The replace flag is added when the library already exi
3737

3838
Now run the command with an additional argument. It's important to understand that `TFCALL` takes both keys and arguments. Because arguments follow keys, the number of keys passed is still `0` in this example.
3939

40-
```redis Execute function
40+
```redis:[run_confirmation=true] Execute function
4141
TFCALL
4242
myFirstLibrary.hello
4343
0
@@ -46,6 +46,6 @@ TFCALL
4646

4747
The library can be deleted with the following command.
4848

49-
```redis Delete library
49+
```redis:[run_confirmation=true] Delete library
5050
TFUNCTION DELETE myFirstLibrary
5151
```

0 commit comments

Comments
 (0)