nebulagraph图数据库中的LOOKUP查询汇总
LOOKUP ON {<vertex_tag> | <edge_type>}
[WHERE <expression> [AND <expression> ...]]
YIELD <return_list> [AS <alias>]
| 模式 | 示例 | 说明 |
|---|---|---|
| 检索点 | LOOKUP ON player WHERE player.name == "Tony Parker" YIELD player.name AS name, player.age AS age |
返回 Tag 为player且name为Tony Parker的点。 |
| 检索边 | LOOKUP ON follow WHERE follow.degree == 90 YIELD follow.degree |
返回 Edge type 为follow且degree为90的边。 |
| 通过 Tag 列出所有点 | LOOKUP ON player YIELD properties(vertex),id(vertex) |
查找所有 Tag 为player的点 VID。 |
| 通过 Edge type 列出边 | LOOKUP ON follow YIELD edge AS e |
查找 Edge type 为follow的所有边的信息。 |
| 统计点 | LOOKUP ON player YIELD id(vertex)| YIELD COUNT(*) AS Player_Count |
统计 Tag 为player的点。 |
| 统计边 | LOOKUP ON follow YIELD edge as e | YIELD COUNT(*) AS Like_Count |
统计 Edge type 为follow的边。 |
郭慕荣博客园

浙公网安备 33010602011771号