我正在尝试学习如何开发 Foxx 服务。
人们使用的例子很多:
const someCollection = module.context.collection('someCollectionName');
但在我的项目中,这段代码不起作用。someCollection 始终为空,但它存在于集合中。
这段代码完美运行:
const db = require('@arangodb').db;
const someCollection = db._collection('someCollectionName');
我的问题是为什么第一个代码不起作用?