ArangoDB 和用户定义的函数或存储过程 [英] ArangoDB and user-defined functions or stored procedures

查看:31
本文介绍了ArangoDB 和用户定义的函数或存储过程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

ArangoDB 文档(Foxx 部分)说:

ArangoDB documentation (Foxx section) says:

因为 Foxx 直接在 ArangoDB 内部运行,所以您可以将处理请求所需的所有数据库查询和逻辑捆绑在一个地方.

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.

除了使用Foxx 框架"来实现与用户定义的函数或 ArangoDB 中的存储过程等效的东西之外,还有其他更原生"的方法吗?

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?

推荐答案

你可以使用 用户定义的函数 可以在 AQL 中使用.

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

UDF 的范围很明确,只能处理您通过参数放入其中的数据.因此 UDF 的范围比存储过程更窄 - 您不能在其中运行子查询.

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.

虽然 Foxx 可以提供比存储过程更多的功能(您可以通过 RESTful HTTP 直接与它对话),但它代表了 ArangoDB 中的存储过程.

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.

这篇关于ArangoDB 和用户定义的函数或存储过程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆