简体   繁体   English

我什么时候应该使用AQL?

[英]When should I use AQL?

In the context of ArangoDB, there are different database shells to query data: 在ArangoDB的上下文中,有不同的数据库外壳可以查询数据:

Although I understand the use of JavaScript and MRuby, I am not sure why I would learn, and where I would use AQL. 尽管我了解JavaScript和MRuby的用法,但是我不确定为什么要学习以及在哪里使用AQL。 Is there any information on this? 是否有任何信息? Is the idea to POST AQL directly to the database server? 是将AQL直接发布到数据库服务器的想法吗?

AQL is ArangoDB's query language. AQL是ArangoDB的查询语言。 It has a lot of ways to query, filter, sort, limit and modify the result that will be returned. 它有很多方法可以查询,过滤,排序,限制和修改将要返回的结果。 It should be noted that AQL only reads data. 应当注意,AQL仅读取数据。

(Update: This answer was targeting an older version of ArangoDB. Since version 2.2, the features have been expanded and data modification on the database is also possible with AQL. For more information on that, visit the documentation link at the end of the answer.) (更新:此答案针对的是较旧版本的ArangoDB。自2.2版以来,此功能已得到扩展,并且使用AQL还可对数据库进行数据修改。有关此的更多信息,请访问答案末尾的文档链接)

You cannot store data to the database with AQL. 您不能使用AQL将数据存储到数据库。

In contrast to AQL, the Javascript or MRuby can read and store data to the database. 与AQL相比,Javascript或MRuby可以读取数据并将其存储到数据库。 However their querying capabilities are very basic and limited, compared to the possibilities that open up with AQL. 但是,与AQL所带来的可能性相比,它们的查询功能非常基础且有限。

It is possible though to send AQL queries from javascript. 虽然可以从javascript发送AQL查询。 Within the arangosh Javascript shell you would issue an AQL query like this: 在arangosh Javascript shell中,您将发出如下AQL查询:

    arangosh> db._query('FOR user IN example FILTER user.age > 30 RETURN user').toArray()
[
  { 
    _id : "4538791/6308263", 
    _rev : "6308263", 
    age : 31, 
    name : "Musterfrau"
   }
]

You can find more info on AQL here: http://www.arangodb.org/manuals/current/Aql.html 您可以在此处找到有关AQL的更多信息: http : //www.arangodb.org/manuals/current/Aql.html

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

相关问题 来自AQL的Arangodb LET变量在FILTER中使用它 - Arangodb LET variable from AQL for use it in FILTER 什么时候使用什么数据库? 即选择要使用的数据库时应该查看哪些参数? - When To Use What Database? i.e. What are the parameters should I look at when choosing a database to use? 我什么时候应该使用 NoSQL 数据库而不是关系数据库? 可以在同一个网站上使用吗? - When should I use a NoSQL database instead of a relational database? Is it okay to use both on the same site? 我什么时候应该使用列族 NoSQL 解决方案与键值、文档存储、图形 - When should I use a Column Family NoSQL solution vs Key-Value, Document Store, Graph 我应该使用NoSQL而不是MySQL吗? - Should I use NoSQL instead of MySQL? 我应该在API上使用NoSQL还是Relational DB - Should I use NoSQL or Relational DB on an API 我应该将memcache与noSQL数据库一起使用吗? - should i use memcache with a noSQL database? 我应该使用mysql或ssdb存储喜欢/投票数据吗? - Should I use mysql or ssdb to store like/vote data? 我应该使用哪个DBMS来处理1000个没有连接的列? - Which DBMS should I use for 1000s of columns and no joins? 在MongoDB中,以下情况我应该使用规范化还是嵌入? - In MongoDB , should I use normalized or embed for following case?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM