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.
Questions tagged [arangojs]
94 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…
![](../../users/profiles/10243170.webp)
Dipti
- 93
- 4
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 =…
![](../../users/profiles/5923130.webp)
LJ Talbot
- 197
- 1
- 14
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…
![](../../users/profiles/3463013.webp)
maku_at
- 1,191
- 2
- 10
- 17
4
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…
![](../../users/profiles/4272651.webp)
Prasanna
- 3,027
- 11
- 25
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.
![](../../users/profiles/5294283.webp)
Haseb Ansari
- 549
- 7
- 21
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…
![](../../users/profiles/209834.webp)
Suhas
- 6,319
- 4
- 31
- 51
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…
![](../../users/profiles/8219532.webp)
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…
![](../../users/profiles/3463013.webp)
maku_at
- 1,191
- 2
- 10
- 17
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…
![](../../users/profiles/364157.webp)
David Thomas
- 1,894
- 2
- 14
- 18
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…
![](../../users/profiles/5559926.webp)
ggendel
- 381
- 2
- 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…
![](../../users/profiles/5559926.webp)
ggendel
- 381
- 2
- 9
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:
…
![](../../users/profiles/13125063.webp)
Santiago Melo Medina
- 33
- 5
2
votes
1 answer
Strange performance problem with UPDATE in ArangoDB
I am creating a Node.js application that works with ArangoDB as data store. Basically, what I have as data structure is two tables, one for managing so-called instances, another one for entities. What I do is the following:
There is a document in…
![](../../users/profiles/1333873.webp)
Golo Roden
- 112,924
- 78
- 260
- 376
2
votes
2 answers
Bulk upsert in ArangoJS?
I have found that I can .save(objects) which creates objects if the key doesn't exist. I have found that I can .bulkUpdate(objects) which updates objects whose keys exist.
My question is: how do I do a bulk upsert? If the key exists, update it…
![](../../users/profiles/1130342.webp)
Luke Pighetti
- 2,785
- 4
- 25
- 40
2
votes
1 answer
arangodb kill query not working require("org/arangodb/aql/queries").kill("2418")
I am just trying to kill query which is stuck but it throws me a error.
127.0.0.1:8529@testapp> require("org/arangodb/aql/queries").kill("2418");
JavaScript exception in file
'/usr/share/arangodb3/js/client/modules/@arangodb/arangosh.js' at
…
![](../../users/profiles/2011389.webp)
vinay
- 21
- 3