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.

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…
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 =…
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…
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…
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.
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…
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…
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,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…
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…
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…
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: …
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…
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…
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 …
vinay
  • 21
  • 3
1
2 3 4 5 6 7