Questions tagged [aql]

ArangoDB Query Language (or AQL) is a declarative querying language used inside the multi-model database ArangoDB.

448 questions
4
votes
2 answers

How to sort all lists in a specific bin in Aerospike using aql?

I have a few question about ordered lists in Aerospike: How can I see in the DB, using aql, if the list is ordered or not? Does ordered list means it’s sorted? I want to scan the db and change all lists (in a specific bin) to be ordered. I want to…
Bat-chen
  • 88
  • 4
4
votes
2 answers

How to get first and last entries in an ArangoDB AQL query

I need help with an ArangoDB AQL query. I have a transaction detail collection (EventTran) that logs update details on its parent table (Event). EventTran attributes include a timestamp, and a reference to the parent _id_event. I’m trying to work…
James Haskell
  • 1,545
  • 2
  • 16
  • 21
4
votes
1 answer

Whats the best method to to filter graph edges by type in AQL

I have the following super-simple graph : What i am trying to do is: Select all questions where there is a property on the question document called firstQuestion with a value of true. Select any options that are connected to the question via an…
IaMaCuP
  • 835
  • 5
  • 19
4
votes
1 answer

How to avoid conflict with AQL in ArangoDB?

I am using AQL to update records in a collection. Sometimes, I get [ArangoError 1200: conflict]. In JS Shell I can set the 3rd parameter as true to use overwrite and ignore the conflict. How do I ignore conflict in AQL?
Deepak Agarwal
  • 907
  • 6
  • 21
4
votes
1 answer

Arangodb pagination with AQL /_api/cursor instead of /_api/simple/all

Arangodb has a LIMIT and SKIP function for simple queries, how would one implement using /api/cursor FOR product in products LIMIT 2 return product Ideally something like FOR product in products LIMIT 20 SKIP 10 return product Or it this…
isawk
  • 969
  • 8
  • 21
4
votes
1 answer

How to ensure that a field in a document is unique in ArangoDB?

I had created a collection in ArangoDB and need to say that one field is unique. For example I need to say that in 'user_table' 'email' is unique. How to do that?
AliPrf
  • 389
  • 2
  • 10
4
votes
1 answer

ArangoDB examples: match anything with a key of x?

Many (all?) of ArangoDB's graph functions accept an "example" document. The documentation for the example parameter says: {} : Returns all possible vertices for this graph idString : Returns the vertex/edge with the id idString [idString1, idString2…
mikewilliamson
  • 24,303
  • 17
  • 59
  • 90
4
votes
2 answers

Arangodb AQL Filter NOT IN collection, very slow

I want to find the set of users not having a profile. ArangoDB 2.4.3 LENGTH(users) -> 130k LENGTH(profiles) -> 110k users.userId -> unique hash index profiles.userId -> unique hash index This AQL snippet I made is slower than a snail crossing…
rollingBalls
  • 1,808
  • 1
  • 14
  • 25
4
votes
3 answers

Last inserted _key in ArangoDB with AQL?

How can i receive a last inserted _key in ArangoDB with AQL query? I put the item in the collection, the following element must contain _key created element. How do I get this _key?
jonua
  • 1,915
  • 3
  • 17
  • 27
4
votes
1 answer

Arangodb AQL similar to NOT IN of SQL

How to do a FILTER like this SQL example in AQL? SELECT * FROM test WHERE option NOT IN ('A', 'B', 'C')
Tarsis
  • 91
  • 6
3
votes
1 answer

How to query the metadata(such as ttl) of record from aql?

Assume you have a set as follows: +-------+-------+ | PK | value | +-------+-------+ | "pk1" | 24 | +-------+-------+ 1 row in set (0.105 secs) How to get the metadata for this?
paradocslover
  • 2,932
  • 3
  • 18
  • 44
3
votes
1 answer

How to Get record from aerospike using list in java?

My data at test.setName looks like this | id | cities | lob | |-------|---------------------|------------| | id123 | ["Cthdcn","Ctdel"] | ["Lob132"] | | id345 | ["Ctijs","Ctdelhi"] | ["LOB231"] | | id765 | ["Cthui"] …
Vrishank Gupta
  • 47
  • 1
  • 2
  • 10
3
votes
2 answers

AQL query with updatingdocuments from two collections runs as transaction or not?

I have a question about transactions in arangodb, if I run below AQL query, will it be executed as one transaction or will it be separated into two transaction? My backend is php: LET r1 = (FOR u IN Users UPDATE u WITH { status: "inactive" } IN…
3
votes
1 answer

ArangoDB - Aggregate sum of descendant attributes in DAG

I have a bill of materials represented in ArangoDB as a directed acyclic graph. The quantity of each part in the bill of materials is represented on the edges while the part names are represented by the keys of the nodes. I'd like to write a query…
Nate Gardner
  • 1,577
  • 1
  • 16
  • 37
3
votes
1 answer

Unsupported command format with token - '""' Aerospike

I am trying to insert a record in aerospike as following : insert into NameSpace.SetName(PK,id,value,formId) values("1","23","hello",""); And I am getting following error: Unsupported command format with token - '""' Make sure string values are…
Awadesh
  • 3,530
  • 2
  • 20
  • 32
1 2
3
29 30