企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持知识库和私有化部署方案 广告
# 通用命令:rawCommand rawCommand -对服务器执行任何通用命令 ``` <pre class="calibre17">``` $redis<span class="token1">-</span><span class="token1">></span><span class="token4">rawCommand</span><span class="token3">(</span><span class="token2">"set"</span><span class="token3">,</span> <span class="token2">"foo"</span><span class="token3">,</span> <span class="token2">"bar"</span><span class="token3">)</span><span class="token3">;</span><span class="token">//true</span> $redis<span class="token1">-</span><span class="token1">></span><span class="token4">rawCommand</span><span class="token3">(</span><span class="token2">"get"</span><span class="token3">,</span> <span class="token2">"foo"</span><span class="token3">)</span><span class="token3">;</span> $redis<span class="token1">-</span><span class="token1">></span><span class="token4">rawCommand</span><span class="token3">(</span><span class="token2">"rpush"</span><span class="token3">,</span> <span class="token2">"mylist"</span><span class="token3">,</span> <span class="token2">"one"</span><span class="token3">,</span> <span class="token6">2</span><span class="token3">,</span> <span class="token6">3.5</span><span class="token3">)</span><span class="token3">)</span><span class="token3">;</span><span class="token">//3</span> $redis<span class="token1">-</span><span class="token1">></span><span class="token4">rawCommand</span><span class="token3">(</span><span class="token2">"lrange"</span><span class="token3">,</span> <span class="token2">"mylist"</span><span class="token3">,</span> <span class="token6">0</span><span class="token3">,</span> <span class="token1">-</span><span class="token6">1</span><span class="token3">)</span><span class="token3">;</span><span class="token">// ["one", "2", "3.5000000000000000"]</span> ``` ```