ArangoDB and user-defined functions or stored procedures

孤人 提交于 2019-12-23 18:37:54

问题


ArangoDB documentation (Foxx section) says:

Because Foxx runs directly inside of ArangoDB it lets you bundle all the database queries and logic necessary to handle a request in one place.

Is there any additional way, 'more native', than using the 'Foxx framework' to implement something equivalent to user-defined functions or stored procedures in ArangoDB?


回答1:


you can use user defined functions which can be used inside of AQL.

UDFs have a clear limited scope of just working with the data you put into them via parameters. So UDFs have a narower scope than stored procedures - you can't run sub-queries in them.

While Foxx can offer more functionality than stored procedures (you can directly talk to it via RESTful HTTP) its what represents stored procedures in ArangoDB.



来源:https://stackoverflow.com/questions/39110281/arangodb-and-user-defined-functions-or-stored-procedures

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!