@acastellon/arango 中文文档教程
arango
使用 arangojs 库的 arango 数据库的简化接口 目前只能访问 JSON 文档,不能访问图形。
configuration
例如保存为 'config.arango.js'
module.exports = {
CERTIFICATION_PATH : '/opt/brdb/Certificate'
/* note: the certification requires a 'ca.pem' file */
/* @TODO: externalize it, and make it more flexible */
,ARANGO_URL: 'http://127.0.0.1:8529'
,ARANGO_USER: 'root'
,ARANGO_PASSWORD: 'root'
,ARANGO_DATABASE: 'test'
,TRACES : false
}
usage
const config = require('./config.arango.js');
const db = require('@acastellon/arango')(config);
methods
查找包含集合中描述的所有参数的
find(parameters, collection)
对象 查找包含集合中描述的任何参数的
findAQL(parameters, collection)
对象 直接使用 ArangoDB 的 AQL 语言查找对象
findAQLSentence(query)
将文档对象保存到集合
save(document, collection)
中 从集合中删除文档对象
remove(document, collection)
arango
A Simplified interface to arango database using the arangojs library At the moment is accessing only to JSON Documents, not graph.
configuration
saved for example as 'config.arango.js'
module.exports = {
CERTIFICATION_PATH : '/opt/brdb/Certificate'
/* note: the certification requires a 'ca.pem' file */
/* @TODO: externalize it, and make it more flexible */
,ARANGO_URL: 'http://127.0.0.1:8529'
,ARANGO_USER: 'root'
,ARANGO_PASSWORD: 'root'
,ARANGO_DATABASE: 'test'
,TRACES : false
}
usage
const config = require('./config.arango.js');
const db = require('@acastellon/arango')(config);
methods
find object(s) that contains all the parameters described in a collection
find(parameters, collection)
find object(s) that contains ANY parameter described in a collection
findAQL(parameters, collection)
find object(s) using directly the AQL language from ArangoDB
findAQLSentence(query)
save a document object into a collection
save(document, collection)
delete a document object from a collection
remove(document, collection)
更多