@@ -93,7 +93,7 @@ The _redis_ singleton is an object instance that's accessible from all scripts.
9393It provides the API to interact with Redis from scripts.
9494Its description follows [ below] ( #redis_object ) .
9595
96- ### < a name = " the-keys-global-variable " ></ a >The _ KEYS _ global variable
96+ ### The _ KEYS _ global variable {# the-keys-global-variable}
9797
9898* Since version: 2.6.0
9999* Available in scripts: yes
@@ -107,7 +107,7 @@ Scripts **should never** access keys with programmatically-generated names or ba
107107The _ KEYS_ global variable is available only for [ ephemeral scripts] ({{< relref "/develop/interact/programmability/eval-intro" >}}).
108108It is pre-populated with all key name input arguments.
109109
110- ### < a name = " the-argv-global-variable " ></ a >The _ ARGV _ global variable
110+ ### The _ ARGV _ global variable {# the-argv-global-variable}
111111
112112* Since version: 2.6.0
113113* Available in scripts: yes
@@ -116,7 +116,7 @@ It is pre-populated with all key name input arguments.
116116The _ ARGV_ global variable is available only in [ ephemeral scripts] ({{< relref "/develop/interact/programmability/eval-intro" >}}).
117117It is pre-populated with all regular input arguments.
118118
119- ## < a name = " redis_object " ></ a > _ redis_ object
119+ ## _ redis_ object {#redis_object}
120120
121121* Since version: 2.6.0
122122* Available in scripts: yes
@@ -126,7 +126,7 @@ The Redis Lua execution context always provides a singleton instance of an objec
126126The _ redis_ instance enables the script to interact with the Redis server that's running it.
127127Following is the API provided by the _ redis_ object instance.
128128
129- ### < a name = " redis.call " ></ a > ` redis.call(command [,arg...]) `
129+ ### ` redis.call(command [,arg...]) ` {#redis.call}
130130
131131* Since version: 2.6.0
132132* Available in scripts: yes
@@ -153,7 +153,7 @@ Note that the call can fail due to various reasons, see [Execution under low mem
153153
154154To handle Redis runtime errors use ` redis.pcall() ` instead.
155155
156- ### < a name = " redis.pcall " ></ a > ` redis.pcall(command [,arg...]) `
156+ ### ` redis.pcall(command [,arg...]) ` {#redis.pcall}
157157
158158* Since version: 2.6.0
159159* Available in scripts: yes
@@ -184,7 +184,7 @@ redis> EVAL "..." 0 hello world
184184(error) ERR Something is wrong, but no worries, everything is under control
185185```
186186
187- ### < a name = " redis.error_reply " ></ a > ` redis.error_reply(x) `
187+ ### ` redis.error_reply(x) ` {#redis.error_reply}
188188
189189* Since version: 2.6.0
190190* Available in scripts: yes
@@ -217,7 +217,7 @@ Refer to the [Data type conversion](#data-type-conversion) for returning other r
217217By convention, Redis uses the first word of an error string as a unique error code for specific errors or ` ERR ` for general-purpose errors.
218218Scripts are advised to follow this convention, as shown in the example above, but this is not mandatory.
219219
220- ### < a name = " redis.status_reply " ></ a > ` redis.status_reply(x) `
220+ ### ` redis.status_reply(x) ` {#redis.status_reply}
221221
222222* Since version: 2.6.0
223223* Available in scripts: yes
247247For returning Redis error replies refer to [ ` redis.error_reply() ` ] ( #redis.error_reply ) .
248248Refer to the [ Data type conversion] ( #data-type-conversion ) for returning other response types.
249249
250- ### < a name = " redis.sha1hex " ></ a > ` redis.sha1hex(x) `
250+ ### ` redis.sha1hex(x) ` {#redis.sha1hex}
251251
252252* Since version: 2.6.0
253253* Available in scripts: yes
@@ -262,7 +262,7 @@ redis> EVAL "return redis.sha1hex('')" 0
262262"da39a3ee5e6b4b0d3255bfef95601890afd80709"
263263```
264264
265- ### < a name = " redis.log " ></ a > ` redis.log(level, message) `
265+ ### ` redis.log(level, message) ` {#redis.log}
266266
267267* Since version: 2.6.0
268268* Available in scripts: yes
@@ -294,7 +294,7 @@ will produce a line similar to the following in your server's log:
294294[32343] 22 Mar 15:21:39 # Something is terribly wrong
295295```
296296
297- ### < a name = " redis.setresp " ></ a > ` redis.setresp(x) `
297+ ### ` redis.setresp(x) ` {#redis.setresp}
298298
299299* Since version: 6.0.0
300300* Available in scripts: yes
@@ -312,7 +312,7 @@ redis.setresp(3)
312312
313313Please refer to the [ Data type conversion] ( #data-type-conversion ) for more information about type conversions.
314314
315- ### < a name = " redis.set_repl " ></ a > ` redis.set_repl(x) `
315+ ### ` redis.set_repl(x) ` {#redis.set_repl}
316316
317317* Since version: 3.2.0
318318* Available in scripts: yes
@@ -367,7 +367,7 @@ redis.call('SET', KEYS[3], ARGV[3])
367367
368368If you run this script by calling ` EVAL "..." 3 A B C 1 2 3 ` , the result will be that only the keys _ A_ and _ C_ are created on the replicas and AOF.
369369
370- ### < a name = " redis.replicate_commands " ></ a > ` redis.replicate_commands() `
370+ ### ` redis.replicate_commands() ` {#redis.replicate_commands}
371371
372372* Since version: 3.2.0
373373* Until version: 7.0.0
@@ -382,23 +382,23 @@ as of Redis v7.0, verbatim script replication is no longer supported.
382382The default, and only script replication mode supported, is script effects' replication.
383383For more information, please refer to [ ` Replicating commands instead of scripts ` ] ({{< relref "/develop/interact/programmability/eval-intro#replicating-commands-instead-of-scripts" >}})
384384
385- ### < a name = " redis.breakpoint " ></ a > ` redis.breakpoint() `
385+ ### ` redis.breakpoint() ` {#redis.breakpoint}
386386
387387* Since version: 3.2.0
388388* Available in scripts: yes
389389* Available in functions: no
390390
391391This function triggers a breakpoint when using the [ Redis Lua debugger] ({{< relref "/develop/interact/programmability/lua-debugging" >}}).
392392
393- ### < a name = " redis.debug " ></ a > ` redis.debug(x) `
393+ ### ` redis.debug(x) ` {#redis.debug}
394394
395395* Since version: 3.2.0
396396* Available in scripts: yes
397397* Available in functions: no
398398
399399This function prints its argument in the [ Redis Lua debugger] ({{< relref "/develop/interact/programmability/lua-debugging" >}}) console.
400400
401- ### < a name = " redis.acl_check_cmd " ></ a > ` redis.acl_check_cmd(command [,arg...]) `
401+ ### ` redis.acl_check_cmd(command [,arg...]) ` {#redis.acl_check_cmd}
402402
403403* Since version: 7.0.0
404404* Available in scripts: yes
@@ -410,7 +410,7 @@ The return value is a boolean `true` in case the current user has permissions to
410410
411411The function will raise an error if the passed command or its arguments are invalid.
412412
413- ### < a name = " redis.register_function " ></ a > ` redis.register_function `
413+ ### ` redis.register_function ` {# redis.register_function}
414414
415415* Since version: 7.0.0
416416* Available in scripts: no
@@ -420,8 +420,7 @@ This function is only available from the context of the [`FUNCTION LOAD`]({{< re
420420When called, it registers a function to the loaded library.
421421The function can be called either with positional or named arguments.
422422
423- #### <a name =" redis.register_function_pos_args " ></a > positional arguments: ` redis.register_function(name, callback) `
424-
423+ #### positional arguments: ` redis.register_function(name, callback) ` {#redis.register_function_pos_args}
425424The first argument to ` redis.register_function ` is a Lua string representing the function name.
426425The second argument to ` redis.register_function ` is a Lua function.
427426
@@ -431,7 +430,7 @@ Usage example:
431430redis> FUNCTION LOAD "#!lua name=mylib\n redis.register_function('noop', function() end)"
432431```
433432
434- #### < a name = " redis.register_function_named_args " ></ a > Named arguments: ` redis.register_function{function_name=name, callback=callback, flags={flag1, flag2, ..}, description=description} `
433+ #### Named arguments: ` redis.register_function{function_name=name, callback=callback, flags={flag1, flag2, ..}, description=description} ` {#redis.register_function_named_args}
435434
436435The named arguments variant accepts the following arguments:
437436
@@ -448,7 +447,7 @@ Usage example:
448447redis> FUNCTION LOAD "#!lua name=mylib\n redis.register_function{function_name='noop', callback=function() end, flags={ 'no-writes' }, description='Does nothing'}"
449448```
450449
451- #### < a name = " script_flags " ></ a > Script flags
450+ #### Script flags {#script_flags}
452451
453452** Important:**
454453Use script flags with care, which may negatively impact if misused.
@@ -510,7 +509,7 @@ You can use the following flags and instruct the server to treat the scripts' ex
510509
511510Please refer to [ Function Flags] ({{< baseurl >}}/develop/interact/programmability/functions-intro#function-flags) and [ Eval Flags] ({{< baseurl >}}/develop/interact/programmability/eval-intro#eval-flags) for a detailed example.
512511
513- ### < a name = " redis.redis_version " ></ a > ` redis.REDIS_VERSION `
512+ ### ` redis.REDIS_VERSION ` {#redis.redis_version}
514513
515514* Since version: 7.0.0
516515* Available in scripts: yes
@@ -523,7 +522,7 @@ The reply's format is `MM.mm.PP`, where:
523522* ** mm:** is the minor version.
524523* ** PP:** is the patch level.
525524
526- ### < a name = " redis.redis_version_num " ></ a > ` redis.REDIS_VERSION_NUM `
525+ ### ` redis.REDIS_VERSION_NUM ` {#redis.redis_version_num}
527526
528527* Since version: 7.0.0
529528* Available in scripts: yes
@@ -661,7 +660,7 @@ That means, for example, that returning the RESP3 map type to a RESP2 connection
661660
662661## Additional notes about scripting
663662
664- ### Using [ ` SELECT ` ] ({{< relref "/commands/select" >}}) inside scripts
663+ ### Using ` SELECT ` inside scripts
665664
666665You can call the [ ` SELECT ` ] ({{< relref "/commands/select" >}}) command from your Lua scripts, like you can with any normal client connection.
667666However, one subtle aspect of the behavior changed between Redis versions 2.8.11 and 2.8.12.
@@ -687,7 +686,7 @@ In addition, the following external libraries are loaded and accessible to scrip
687686* The [ _ cmsgpack_ library] ( #cmsgpack-library )
688687* The [ _ bitop_ library] ( #bitop-library )
689688
690- ### < a name = " os-library " ></ a > _ os _ library
689+ ### _ os _ library {# os-library}
691690
692691* Since version: 7.4
693692* Available in scripts: yes
@@ -699,7 +698,7 @@ Note that for sandbox security, currently only the following os functions is exp
699698
700699* ` os.clock() `
701700
702- ### < a name = " struct-library " ></ a > _ struct _ library
701+ ### _ struct _ library {# struct-library}
703702
704703* Since version: 2.6.0
705704* Available in scripts: yes
@@ -714,7 +713,7 @@ It provides the following functions:
714713
715714All of _ struct_ 's functions expect their first argument to be a [ format string] ( #struct-formats ) .
716715
717- #### < a name = " struct-formats " ></ a > _ struct _ formats
716+ #### _ struct _ formats {# struct-formats}
718717
719718The following are valid format strings for _ struct_ 's functions:
720719
@@ -735,7 +734,7 @@ The following are valid format strings for _struct_'s functions:
735734* ` d ` : double
736735* ` ` (space): ignored
737736
738- #### < a name = " struct.pack " ></ a > ` struct.pack(x) `
737+ #### ` struct.pack(x) ` {#struct.pack}
739738
740739This function returns a struct-encoded string from values.
741740It accepts a [ _ struct_ format string] ( #struct-formats ) as its first argument, followed by the values that are to be encoded.
@@ -747,7 +746,7 @@ redis> EVAL "return struct.pack('HH', 1, 2)" 0
747746"\x01\x00\x02\x00"
748747```
749748
750- #### < a name = " struct.unpack " ></ a > ` struct.unpack(x) `
749+ #### ` struct.unpack(x) ` {#struct.unpack}
751750
752751This function returns the decoded values from a struct.
753752It accepts a [ _ struct_ format string] ( #struct-formats ) as its first argument, followed by encoded struct's string.
@@ -761,7 +760,7 @@ redis> EVAL "return { struct.unpack('HH', ARGV[1]) }" 0 "\x01\x00\x02\x00"
7617603) (integer) 5
762761```
763762
764- #### < a name = " struct.size " ></ a > ` struct.size(x) `
763+ #### ` struct.size(x) ` {#struct.size}
765764
766765This function returns the size, in bytes, of a struct.
767766It accepts a [ _ struct_ format string] ( #struct-formats ) as its only argument.
@@ -773,7 +772,7 @@ redis> EVAL "return struct.size('HH')" 0
773772(integer) 4
774773```
775774
776- ### < a name = " cjson-library " ></ a > _ cjson _ library
775+ ### _ cjson _ library {# cjson-library}
777776
778777* Since version: 2.6.0
779778* Available in scripts: yes
@@ -782,7 +781,7 @@ redis> EVAL "return struct.size('HH')" 0
782781The _ cjson_ library provides fast [ JSON] ( https://json.org ) encoding and decoding from Lua.
783782It provides these functions.
784783
785- #### < a name = " cjson.encode() " ></ a > ` cjson.encode(x) `
784+ #### ` cjson.encode(x) ` {# cjson.encode}
786785
787786This function returns a JSON-encoded string for the Lua data type provided as its argument.
788787
@@ -793,7 +792,7 @@ redis> EVAL "return cjson.encode({ ['foo'] = 'bar' })" 0
793792"{\"foo\":\"bar\"}"
794793```
795794
796- #### < a name = " cjson.decode() " ></ a > ` cjson.decode(x) `
795+ #### ` cjson.decode(x) ` {# cjson.decode()}
797796
798797This function returns a Lua data type from the JSON-encoded string provided as its argument.
799798
@@ -804,7 +803,7 @@ redis> EVAL "return cjson.decode(ARGV[1])['foo']" 0 '{"foo":"bar"}'
804803"bar"
805804```
806805
807- ### < a name = " cmsgpack-library " ></ a > _ cmsgpack _ library
806+ ### _ cmsgpack _ library {# cmsgpack-library}
808807
809808* Since version: 2.6.0
810809* Available in scripts: yes
@@ -813,7 +812,7 @@ redis> EVAL "return cjson.decode(ARGV[1])['foo']" 0 '{"foo":"bar"}'
813812The _ cmsgpack_ library provides fast [ MessagePack] ( https://msgpack.org/index.html ) encoding and decoding from Lua.
814813It provides these functions.
815814
816- #### < a name = " cmsgpack.pack() " ></ a > ` cmsgpack.pack(x) `
815+ #### ` cmsgpack.pack(x) ` {# cmsgpack.pack()}
817816
818817This function returns the packed string encoding of the Lua data type it is given as an argument.
819818
@@ -824,7 +823,7 @@ redis> EVAL "return cmsgpack.pack({'foo', 'bar', 'baz'})" 0
824823"\x93\xa3foo\xa3bar\xa3baz"
825824```
826825
827- #### < a name = " cmsgpack.unpack() " ></ a > ` cmsgpack.unpack(x) `
826+ #### ` cmsgpack.unpack(x) ` {# cmsgpack.unpack()}
828827
829828This function returns the unpacked values from decoding its input string argument.
830829
@@ -837,7 +836,7 @@ redis> EVAL "return cmsgpack.unpack(ARGV[1])" 0 "\x93\xa3foo\xa3bar\xa3baz"
8378363) "baz"
838837```
839838
840- ### < a name = " bitop-library " ></ a > _ bit _ library
839+ ### _ bit _ library {# bitop-library}
841840
842841* Since version: 2.8.18
843842* Available in scripts: yes
@@ -847,7 +846,7 @@ The _bit_ library provides bitwise operations on numbers.
847846Its documentation resides at [ Lua BitOp documentation] ( http://bitop.luajit.org/api.html )
848847It provides the following functions.
849848
850- #### < a name = " bit.tobit() " ></ a > ` bit.tobit(x) `
849+ #### ` bit.tobit(x) ` {# bit.tobit()}
851850
852851Normalizes a number to the numeric range for bit operations and returns it.
853852
@@ -858,7 +857,7 @@ redis> EVAL 'return bit.tobit(1)' 0
858857(integer) 1
859858```
860859
861- #### < a name = " bit.tohex() " ></ a > ` bit.tohex(x [,n]) `
860+ #### ` bit.tohex(x [,n]) ` {#bit.tohex()}
862861
863862Converts its first argument to a hex string. The number of hex digits is given by the absolute value of the optional second argument.
864863
@@ -869,11 +868,11 @@ redis> EVAL 'return bit.tohex(422342)' 0
869868"000671c6"
870869```
871870
872- #### < a name = " bit.bnot() " ></ a > ` bit.bnot(x) `
871+ #### ` bit.bnot(x) ` {# bit.bnot()}
873872
874873Returns the bitwise ** not** of its argument.
875874
876- #### < a name = " bit.ops " ></ a > ` bit.bnot(x) ` ` bit.bor(x1 [,x2...]) ` , ` bit.band(x1 [,x2...]) ` and ` bit.bxor(x1 [,x2...]) `
875+ #### ` bit.bnot(x) ` ` bit.bor(x1 [,x2...]) ` , ` bit.band(x1 [,x2...]) ` and ` bit.bxor(x1 [,x2...]) ` {#bit.ops}
877876
878877Returns either the bitwise ** or** , bitwise ** and** , or bitwise ** xor** of all of its arguments.
879878Note that more than two arguments are allowed.
@@ -885,16 +884,16 @@ redis> EVAL 'return bit.bor(1,2,4,8,16,32,64,128)' 0
885884(integer) 255
886885```
887886
888- #### < a name = " bit.shifts " ></ a > ` bit.lshift(x, n) ` , ` bit.rshift(x, n) ` and ` bit.arshift(x, n) `
887+ #### ` bit.lshift(x, n) ` , ` bit.rshift(x, n) ` and ` bit.arshift(x, n) ` {#bit.shifts}
889888
890889Returns either the bitwise logical ** left-shift** , bitwise logical ** right-shift** , or bitwise ** arithmetic right-shift** of its first argument by the number of bits given by the second argument.
891890
892- #### < a name = " bit.ro " ></ a > ` bit.rol(x, n) ` and ` bit.ror(x, n) `
891+ #### ` bit.rol(x, n) ` and ` bit.ror(x, n) ` {#bit.ro}
893892
894893Returns either the bitwise ** left rotation** , or bitwise ** right rotation** of its first argument by the number of bits given by the second argument.
895894Bits shifted out on one side are shifted back in on the other side.
896895
897- #### < a name = " bit.bswap() " ></ a > ` bit.bswap(x) `
896+ #### ` bit.bswap(x) ` {# bit.bswap()}
898897
899898Swaps the bytes of its argument and returns it.
900899This can be used to convert little-endian 32-bit numbers to big-endian 32-bit numbers and vice versa.
0 commit comments