arangodb / arangojs

The official ArangoDB JavaScript driver.
https://arangodb.github.io/arangojs
Apache License 2.0
600 stars 106 forks source link

aql query doesnt get exicuted #781

Closed MurkyTheMurloc closed 1 year ago

MurkyTheMurloc commented 1 year ago

I guys I have a problem with this specifig aql query

for example following query gets executed without any problem: const query = aql FOR doc IN year2023 FILTER doc._key == ${month} REPLACE doc WITH MERGE(doc,{openOrders: UNSET(doc.openOrders, ${name})}) IN year2023 ;

But this example doesn't get executed but also doesn't throw any error also using binding didn't change something: const year ="year2023"; const query = aql FOR doc IN ${year} FILTER doc._key == ${month} REPLACE doc WITH MERGE(doc,{openOrders: UNSET(doc.openOrders, ${name})}) IN ${year} ;

pluma4345 commented 1 year ago

aql itself doesn't execute a query, it only creates a query object you can then pass to db.query to execute, which will return a promise for an ArrayCursor containing the result data.

If you think there's a different problem, please feel free to reopen this issue.