The documentation is located here:
Document Manipulation ยท ArangoDB v3.4.1 Drivers Documentation
I see the documentation for collection.replace()
and collection.update()
, but nothing for collection.save()
. I know the save function exits because I'm using it. But it doesn't return the expected value and I'd like to reference the documentation.
My specific problem is that I want to save a document to the ArangoDB database and get back the saved document in full. Here's what I have so far:
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")
}
}