相关疑难解决方法(0)

如何使用Cypher返回节点的所有属性?

我知道可以使用通配符(*)符号返回Cypher查询中的所有引用,例如:

MATCH p:Product WHERE p.price='1950' RETURN *;

  ==> +----------------------------------------------------------------+
  ==> | p                                                              |
  ==> +----------------------------------------------------------------+
  ==> | Node[686]{title:"Giorgio Armani Briefcase",price:"1950",...    |
  ==> +----------------------------------------------------------------+
Run Code Online (Sandbox Code Playgroud)

但是,结果是一行具有名为"p"的单个节点"列",可以从中访问属性.但是,我希望结果集"行"将属性名称设置为"列".就像是:

MATCH p:Product WHERE p.price='1950' RETURN p.*;

  ==> +-------------------------------------------+
  ==> | title | price | ...                       |
  ==> +-------------------------------------------+
  ==> | "Giorgio Armani Briefcase" | "1950" | ... |
  ==> +-------------------------------------------+
Run Code Online (Sandbox Code Playgroud)

该特定查询无效,但有没有办法实现相同的结果(没有明确列出所有属性,如p.title,p.price,p ...)?

graph neo4j cypher

19
推荐指数
4
解决办法
2万
查看次数

标签 统计

cypher ×1

graph ×1

neo4j ×1