本文介绍了OrientDB Query属性的查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个顶点类:位置和用户和我有两个边缘:Friend和GoingTo。用户可以是与另一个用户的朋友,并且用户也可以去到一个位置。边缘GoingTo有一个datetime属性叫go_date,用户要去的位置的日期。

I have two vertex classes: Location and User and I have two edges also: Friend and GoingTo. A User can be 'Friend' with another User and a User can also 'GoingTo' a Location. The edge GoingTo has a datetime property called going_date with the date the user is going to the Location.

我想返回每个位置 )边缘从作为特定起始用户(作为示例#12:11)的(朋友)的用户。

I want to return every ‘Location’ that has a in("GoingTo") edge from an ‘User’ that is a ("Friend") of a specific starting ‘User’ (#12:11 as example).

这里是所有的位置,但没有日期属性的goingTo ...

What I have here is all locations but without the date property of goingTo...

SELECT expand(both('Friend').out('goingTo')) FROM #12:11

如何通过边缘属性查询? p>

How can I query by this edge property?

推荐答案

您可以过滤边缘的属性:

You can filter on edge's property:

SELECT expand(both('Friend')。outE('goingTo')[going_date ='2015-01-01']。inV())FROM#12:11

这篇关于OrientDB Query属性的查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-31 06:08