请输入您要查询的百科知识:

 

词条 AQL (ArangoDB Query Language)
释义

  1. Example

  2. References

  3. External References

{{mergeto|ArangoDB|discuss=Talk:ArangoDB#Merge_AQL|date=October 2018}}{{Multiple issues|{{One source|date=December 2017}}{{Refimprove|date=December 2017}}}}

AQL is the SQL-like query language[1] used in the ArangoDB database management system. It supports CRUD operations for both documents (nodes) and edges, but it is not a data definition language (DDL). AQL does support geospatial queries.

AQL is JSON-oriented as illustrated by the following query, which also illustrates the intuitive "dot" notation for accessing the values of keys:

 FOR x IN [{"a": {"A":1}}, {"a": {"A": 2}}]     FILTER x.a.A < 2     RETURN x.a

Example

The following is a parameterized query for finding the number of descendants of a particular node (@start) in a graph named @g with @max nodes:

 FOR v IN 1 .. @max OUTBOUND @start GRAPH @g     OPTIONS {uniqueVertices: "global", bfs: true } COLLECT WITH COUNT INTO c RETURN c

The uppercase words are AQL keywords. Notice how AQL is graph-aware. The OPTIONS are necessary to ensure the query can be run on a graph with cycles;

"bfs" stands for breadth-first search.

References

1. ^{{cite web|url=https://www.arangodb.com/why-arangodb/sql-aql-comparison|title=SQL and AQL (ArangoDB Query Language) Comparison|website=Arangodb.com|accessdate=17 December 2017}}

External References

  • [https://docs.arangodb.com/current/AQL/index.html|AQL Documentation]

1 : Query languages

随便看

 

开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。

 

Copyright © 2023 OENC.NET All Rights Reserved
京ICP备2021023879号 更新时间:2024/9/22 7:22:21