问题
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