获取图中所有内容的 graql 查询是什么
What is the graql query for getting everything in the graph
我有一个只有几个顶点的小图。如何使用 graql 打印出图中的所有顶点?
我假设你指的是所有实例。在那种情况下,最简单的方法是:
match $x isa $type; $type isa concept-type; select $x
如果只想要实体,可以将上面的concept-type
改为entity-type
。
match $a isa $b
这会为您提供图表中的所有内容,因为所有内容都有类型。
我有一个只有几个顶点的小图。如何使用 graql 打印出图中的所有顶点?
我假设你指的是所有实例。在那种情况下,最简单的方法是:
match $x isa $type; $type isa concept-type; select $x
如果只想要实体,可以将上面的concept-type
改为entity-type
。
match $a isa $b
这会为您提供图表中的所有内容,因为所有内容都有类型。