Skip to content

Commit

Permalink
[automated site update]
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Dec 24, 2024
1 parent 98c9773 commit 86341e8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions apidoc/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -502,10 +502,10 @@ <h3><a class="anchor" id="autotoc_md30"></a>
<div class="line">...</div>
</div><!-- fragment --><p>The <code><a class="el" href="redisx_8c.html#a09092bd97eead5c5fa73fa0d9241018c">redisxRequest()</a></code> sends a command with up to three arguments. If the command takes fewer than 3 parameters, then the remaining ones must be set to <code>NULL</code>. This function thus offers a simple interface for running most basic sequential queries. In cases where 3 parameters are not sufficient, you may use <code><a class="el" href="redisx_8c.html#ac6767cea95b4cc90348796c61ebdac75">redisxArrayRequest()</a></code> instead, e.g.:</p>
<div class="fragment"><div class="line">...</div>
<div class="line">char *args[] = { <span class="stringliteral">&quot;HGET&quot;</span>, <span class="stringliteral">&quot;my_table&quot;</span>, <span class="stringliteral">&quot;my_key&quot;</span> }; <span class="comment">// parameters as an array...</span></div>
<div class="line">char *cmd[] = { <span class="stringliteral">&quot;HGET&quot;</span>, <span class="stringliteral">&quot;my_table&quot;</span>, <span class="stringliteral">&quot;my_key&quot;</span> }; <span class="comment">// command and parameters as an array...</span></div>
<div class="line"> </div>
<div class="line"><span class="comment">// Send &quot;HGET my_table my_key&quot; request with an array of 3 components...</span></div>
<div class="line">resp = <a class="code hl_function" href="redisx_8c.html#ac6767cea95b4cc90348796c61ebdac75">redisxArrayRequest</a>(redis, args, NULL, 3, &amp;status);</div>
<div class="line">resp = <a class="code hl_function" href="redisx_8c.html#ac6767cea95b4cc90348796c61ebdac75">redisxArrayRequest</a>(redis, cmd, NULL, 3, &amp;status);</div>
<div class="line">...</div>
<div class="ttc" id="aredisx_8c_html_ac6767cea95b4cc90348796c61ebdac75"><div class="ttname"><a href="redisx_8c.html#ac6767cea95b4cc90348796c61ebdac75">redisxArrayRequest</a></div><div class="ttdeci">RESP * redisxArrayRequest(Redis *redis, const char **args, const int *lengths, int n, int *status)</div><div class="ttdef"><b>Definition</b> redisx.c:641</div></div>
</div><!-- fragment --><p>The 3rd argument in the list is an optional <code>int[]</code> array defining the individual string lengths of the parameters (if need be, or else readily available). Here, we used <code>NULL</code> instead, which will use <code>strlen()</code> on each supplied string-terminated parameter to determine its length automatically. Specifying the length may be necessary if the individual parameters are not 0-terminated strings.</p>
Expand Down
4 changes: 2 additions & 2 deletions doc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -532,10 +532,10 @@ sequential queries. In cases where 3 parameters are not sufficient, you may use
```c
...
char *args[] = { "HGET", "my_table", "my_key" }; // parameters as an array...
char *cmd[] = { "HGET", "my_table", "my_key" }; // command and parameters as an array...
// Send "HGET my_table my_key" request with an array of 3 components...
resp = redisxArrayRequest(redis, args, NULL, 3, &status);
resp = redisxArrayRequest(redis, cmd, NULL, 3, &status);
...
```
Expand Down

0 comments on commit 86341e8

Please sign in to comment.