获取连接到不属于特定 class 的节点的所有关系

Get all relationships connected to a node that are NOT of a particular class

因此,您可以通过查询

轻松获取到特定class的顶点的所有连接

select from Foo where both() in (#42:1)

这将获取 class Foo 的所有顶点,这些顶点通过出站或入站链接连接到顶点 #42:1

但是,如果我想获取所有连接到 #42:1 的顶点,这些顶点是 not class [=] 的实例,那么查询会是什么? 12=]?

OrientDB 本身是否支持此功能,或者我是否必须执行类似交集的操作?

为什么不使用

SELECT * FROM (
... your select query
)
WHERE @class <> 'Foo'

另一种方式可以使用匹配表达式来表示

MATCH
{E, where:(@class <> 'Foo')}-your_relation->{class:Foo}
RETURN E, F

罗布