From f9e515e0bdf80badee587329d6d50de44decab0f Mon Sep 17 00:00:00 2001 From: cooper-lzy <78672629+cooper-lzy@users.noreply.github.com> Date: Fri, 31 Dec 2021 10:06:53 +0800 Subject: [PATCH] enhance param command (#1344) * enhance param command * update --- docs-2.0/nebula-console.md | 66 ++++++++++++++++++++++---------------- 1 file changed, 39 insertions(+), 27 deletions(-) diff --git a/docs-2.0/nebula-console.md b/docs-2.0/nebula-console.md index d5d3018e695..484d740bb2f 100644 --- a/docs-2.0/nebula-console.md +++ b/docs-2.0/nebula-console.md @@ -20,38 +20,50 @@ Nebula Console 是 Nebula Graph 的原生命令行客户端,用于连接 Nebul - 会话释放后,参数不会保留。 -保存参数命令如下: +- 保存参数命令如下: -```ngql -nebula> :param => ; -``` + ```ngql + nebula> :param => ; + ``` -示例: + 示例: -```ngql -nebula> :param p1 => "Tim Duncan"; -nebula> MATCH (v:player{name:$p1})-[:follow]->(n) RETURN v,n; -+----------------------------------------------------+-------------------------------------------------------+ -| v | n | -+----------------------------------------------------+-------------------------------------------------------+ -| ("player100" :player{age: 42, name: "Tim Duncan"}) | ("player125" :player{age: 41, name: "Manu Ginobili"}) | -| ("player100" :player{age: 42, name: "Tim Duncan"}) | ("player101" :player{age: 36, name: "Tony Parker"}) | -+----------------------------------------------------+-------------------------------------------------------+ - -nebula> :param p2 => {"a":3,"b":false,"c":"Tim Duncan"}; -nebula> RETURN $p2.b AS b; -+-------+ -| b | -+-------+ -| false | -+-------+ -``` + ```ngql + nebula> :param p1 => "Tim Duncan"; + nebula> MATCH (v:player{name:$p1})-[:follow]->(n) RETURN v,n; + +----------------------------------------------------+-------------------------------------------------------+ + | v | n | + +----------------------------------------------------+-------------------------------------------------------+ + | ("player100" :player{age: 42, name: "Tim Duncan"}) | ("player125" :player{age: 41, name: "Manu Ginobili"}) | + | ("player100" :player{age: 42, name: "Tim Duncan"}) | ("player101" :player{age: 36, name: "Tony Parker"}) | + +----------------------------------------------------+-------------------------------------------------------+ + + nebula> :param p2 => {"a":3,"b":false,"c":"Tim Duncan"}; + nebula> RETURN $p2.b AS b; + +-------+ + | b | + +-------+ + | false | + +-------+ + ``` -查看当前保存的参数命令如下: +- 查看当前保存的所有参数,命令如下: -```ngql -nebula> :params; -``` + ```ngql + nebula> :params; + ``` + +- 查看指定参数,命令如下: + + ```ngql + nebula> :params ; + ``` + +- 删除指定参数,命令如下: + + ```ngql + nebula> :param =>; + ``` ## 导出执行结果