简体   繁体   English

OrientDB查询以按specyfic类型的边缘连接所有顶点

[英]Orientdb query for getting all vertices connected by edge of specyfic type

I'm looking for query that will return vertices that are connected to specific vertex (with known rid) by specific edge class, problem is that the connected vertices can have different classes 我正在寻找查询,该查询将返回通过特定边类连接到特定顶点(具有已知rid)的顶点,问题是连接的顶点可以具有不同的类

我的图

in this example i need query that will give me #68:0, #72:5. 在此示例中,我需要将给我#68:0,#72:5的查询。 What I need exactly, is the properties data for them and in orient studio browse mode it returns only links to them result 我确切需要的是它们的属性数据,并且在Orient Studio浏览模式下,它仅返回指向它们的链接结果

Given a specific vertex rid and edge class you can use the out() function to get adjacent outgoing vertices and the expand() function to include all fields: 给定特定的顶点去除和边缘类,您可以使用out()函数获取相邻的输出顶点,并可以使用expand()函数包括所有字段:

SELECT expand(out("has_conditionsElement")) FROM #44:62

You can also use in() for incoming vertices: 您也可以将in()用于传入的顶点:

SELECT expand(in("has_conditionsElement")) FROM #44:62

Or both() for all directions: 或针对所有方向的both():

SELECT expand(both("has_conditionsElement")) FROM #44:62

Source: 资源:

SQL-Functions > out() SQL函数> out()

SQL-Functions > in() SQL函数> in()

SQL-Functions > both() SQL函数> both()

SQL-Functions > expand() SQL函数> expand()

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM