文档位于此处:
文档操作·ArangoDB v3.4.1 驱动程序文档
我看到了collection.replace()
and的文档collection.update()
,但没有看到collection.save()
. 我知道保存功能退出,因为我正在使用它。但它没有返回预期值,我想参考文档。
我的具体问题是我想将文档保存到 ArangoDB 数据库并完整地取回保存的文档。这是我到目前为止所拥有的:
async createDocument(collectionName, data) {
try {
const collection = this.db.collection(collectionName);
return collection.save(data); //I want to return the saved document
} catch(err) {
console.log(err.message, "saving failed")
}
}