简体   繁体   中英

modify vertex or edges attributes with a Traversal Object in ArangoDB?

是否可以/允许使用图形遍历对象在config visitor函数内修改顶点或边的属性?

Right now the Traversal functionality is read-only due to potential side-effects and deadlock situations. We are improving the traversals at the moment, so this feature will be included soon (it might be in a different way than via the visitor function.

As a workaround for the current release you could do the following: 1) Write a visitor function that returns everything necessary to know which attributes on which objects have to be modified (eg a list of object _id values). In a second request you can update all of these documents.

2) Write a Foxx microservice that encapsulates both requests, namely: * Start a transaction function with all potential collections (optional) * Execute the traversal and compute the information to update objects. * Update the documents. * Close the transaction function

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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