1
私はArangodbとNode.jsで作業しています。私はdbのedgecollectionを使用しようとしています。私はnpmからarangojsをダウンロードし、サンプルコードを試してみました。Arangodb - アサーションエラーedge._keyを取得しているEDGEとの作業
// ## Assigning the values
const arangojs = require('arangojs');
const aqlQuery = arangojs.aqlQuery;
const now = Date.now();
// ## Const variables for connecting to ArangoDB database
const host = '192.100.00.000'
const port = '8529'
const username = 'xyz'
const password = 'XYZ'
const path = '/_db/sgcdm_app/_api/'
const database = 'sgcdm_app'
// ## Connection to ArangoDB
db = new arangojs.Database({
url: http://${host}:${port},
databaseName: database
});
db.useBasicAuth(username, password);
// ## Working with EDGES
const collection = db.edgeCollection('included_in');
const edge = collection.edge('included_in/595783');
const assert = require('assert');
// the edge exists
assert.equal(edge._key, '595783');
assert.equal(edge._id, 'included_in/595783');
console.log(db);
ERROR:
assert.js:42 throw new errors.AssertionError({ AssertionError [ERR_ASSERTION]: undefined == '595783'
あなたは未定義のエッジが 'included_in'コレクションに実際にあると思いますか? – peak