简体   繁体   English

在AQL中组合边缘和文档集合

[英]Combining Edge and Document Collections in AQL

Is it possible to query, through the same AQL query, several collections effectivelly (with index speed) being some of those edge or document collections? 是否可以通过相同的AQL查询查询几个有效(具有索引速度)的集合是哪些边缘或文档集合? I wanted to emulate more or less the behaviour of foreign keys on RDBMs on tables using edges. 我想使用边缘在表上的RDBM上或多或少地模拟外键的行为。

Thanx 感谢名单

I can confirm: EDGES() and NEIGHBORS() will use the automatically available indexes on the _from and/or _to attributes in the edge collections. 我可以确认:EDGES()和NEIGHBORS()将使用边集合中_from和/或_to属性的自动可用索引。

You may also join manually using a FILTER clause, eg 您也可以使用FILTER子句手动加入,例如

FOR ...
  FILTER e._from == something_else._id
  RETURN ...

If you are using document fields which are indexed by default then the behaviour is similar to foreign keys in RDBMS. 如果您使用的是默认索引的文档字段,则行为类似于RDBMS中的外键。 For example, by default, document type collections indexes _id field and edge type collections indexes _id , _from and _to fields. 例如,默认情况下,文档类型集合索引_id字段和边缘类型集合索引_id_from_to字段。 AQL functions such as EDGES or NEIGHBORS are using these indexes to query relevant data. 诸如EDGESNEIGHBORS类的AQL函数正在使用这些索引来查询相关数据。

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

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