Questions tagged [arangojs]

ArangoDB is a NoSQL database with graphs support. Its key features are schemaless documents, key/value store, transactions and joins, also ArangoDB allows for multi-master clustering and horizontal scalability.

113 questions
9
votes
2 answers

Duplicate documents getting inserted in edge collection

I am using node driver version 6 of arangodb to insert relations between two vertices as follows. db.collection("starks").save({ _from: "Starks/Lyanna-Stark", _to: "Starks/Ned-Stark", type: "married" }); This inserts relation…
Dipti
  • 93
  • 4
5
votes
4 answers

How to check if a collection already exists in ArangoDB

Say I have a collection Col1 that already exists in my database. So, doing something like: var col = db.collection('Col1'); col.save({"name":"something"}); will work perfectly fine. But if a collection Col2 that doesn't already exist in my…
Prasanna
  • 4,125
  • 18
  • 41
4
votes
1 answer

What is the proper way to use IF THEN in AQL?

I'm trying to use IF THEN style AQL, but the only relevant operator I could find in the AQL documentation was the ternary operator. I tried to add IF THEN syntax to my already working AQL but it gives syntax errors no matter what I try. LET doc =…
ElJay
  • 347
  • 4
  • 17
4
votes
0 answers

Strategy for arangodb data backup in docker container

I would like to do a backup of arangodb data in case of arangodb runs in a docker container. (the data of arangodb are mounted as volume to the host system). One solution would be to create a docker image (based on the official arangodb image) which…
maku_at
  • 1,579
  • 2
  • 13
  • 21
4
votes
1 answer

How to store images in ArangoDB?

I want to store images in ArangoDb as image file. I want to know if there is any API or Java API for the same. Thanking You in advance.
Haseb Ansari
  • 587
  • 1
  • 7
  • 23
4
votes
2 answers

How to store documents in an ArangoDb graph using ArangoJs?

I am using latest version of ArangoDb and ArangoJs from a nodejs application. I have got following two vertexes users tokens tokens vertex contain the security tokens issues to one of the user in the users vertex. I have got an edge definition…
Suhas
  • 7,919
  • 5
  • 34
  • 54
3
votes
0 answers

Mock ArangoJS on NodeJS unit test

I am using ArangoDB as storage of my sample JSON license file. I have a function that contains an AQL query like this: listLicenses: async function listLicenses() { let result = []; await this.useLicenseDb(); const licenseCol = await…
Lëmön
  • 322
  • 2
  • 14
3
votes
2 answers

Simple query with arangodb and nodejs

I want to execute a simple query in my database arangodb with nodejs for a login page. var arango = require('arangojs'); /*---*/ Database = arango.Database; db = new…
Erako
  • 31
  • 3
3
votes
1 answer

difference between ordinary collection and vertex collection

I read about graphs in How to store documents in an ArangoDb graph using ArangoJs? Now I have the following use case: I have a backend using ArangoDb and have 2 ordinary collections for USER and LOCATION. Now I want to implement a "rating" of a…
maku_at
  • 1,579
  • 2
  • 13
  • 21
3
votes
1 answer

Error when using collection names as variables in ArangoDb with arangojs and aqlQuery

I've been arangojs for a few months and recently had some of my code start failing that used to work, regarding the use of variables as collection names when using template strings and aqlQuery. I'm using Node.js 4.4.0 on Windows 10. This example…
David Thomas
  • 2,264
  • 2
  • 18
  • 20
3
votes
1 answer

ArangoDB efficient traversal via node attributes

In OrientDB, each vertex has connected edges attached. This means that it possible to explicitly walk nodes from a collection by using nested "select" statements. As an example: Given a path of node attributes, find the matching end node. The path…
ggendel
  • 403
  • 3
  • 9
3
votes
1 answer

ArangoDB transaction request from a node.js app returns 403: forbidden

I'm trying to replace OrientDB with ArangoDB in a node.js application and I'm having trouble getting a transaction to work. This code creates a pmsite document, a pmprojcat document, and a relationship (pm_child) between the two. The code returns a…
ggendel
  • 403
  • 3
  • 9
2
votes
0 answers

Random lock timeout error on ArangoDB update

I got this random timeout error when updating existing document. AQL: timeout waiting to lock key Operation timed out: Timeout waiting to lock key; key: 1013 (while executing) ArangoDB version: 3.9 ArangoJS version :8.0.0
Sun Chanras
  • 49
  • 2
  • 7
2
votes
1 answer

Connecting to multiple databases with arangodb

I'm building a product which requires creation of a new db dynamically for each project as a new team will create a new project depending on need. See image below. The backend is implemented with Node.js, Express.js, TypeScript and ArangoDB is the…
kashyap
  • 133
  • 1
  • 10
2
votes
1 answer

Arangodb connection fail on docker-entrypoint-initdb.d

I'm trying to initialize my docker arangodb, but keep getting connection error: I've tried changing the server endpoint to http+tcp://..... but the error remains, what could be happening? docker-compose.yml: version: '3.3' services: db: …
1
2 3 4 5 6 7 8