You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
713 B

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

+ 查询节点入度为1的其他节点
```sql
# view 为标签 name 为节点属性, <--表示指向方向
match (n:view{name: "CRZ_FINANCE_INVEST_PRJ_DETAIL_VW" })<--(b) return n,b
```
+ 查询某个节点入度(其他节点指向该节点)
```
match (n:view{name: 'CRZ_FINANCE_INVEST_PRJ_DETAIL_VW'}) with n, size((n)<-[]-()) as s return s;
```
+ 向上遍历
```cpyher
# 查询与视图CRZ_FINANCE_INVEST_PRJ_DETAIL_VW相关的所有节点及关系,<-表示入度,在这个例子中,视图是作为被其他节点指向的一方
MATCH (c:view{name:"CRZ_FINANCE_INVEST_PRJ_DETAIL_VW"})<-[r*0..]-(result) return result
MATCH (c:view{name:"DW_INFRASTRUCTURE_INDEX_VW"})<-[r*0..]-(result) return result
```