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
1
vote
1 answer

How to execute generic query in ArangoJs?

I need to execute the following query: const query = `FOR u IN ${collection} FILTER ${filter} RETURN u` so that filter variable is generated somehow by me (it is corrects, checked with Arango console) But db.query(query) always returns empty…
Bogdan Timofeev
  • 1,062
  • 3
  • 11
  • 33
1
vote
1 answer

How to unwind data held in edges with a "common neighbors" style query?

I have a simple model with a single A Document collection [{ _key: 'doc1', id: 'a/doc1', name: 'Doc 1' }, { _key: 'doc2', id: 'a/doc2', name: 'Doc 2' }] and a single B Edge collection, joining documents A with an held weight integer on each…
Cyril CHAPON
  • 3,556
  • 4
  • 22
  • 40
1
vote
0 answers

How to perform a bidirectional upsert in ArangoDB

I'm working with a dataset similar to ArangoDB official "friendship" example, except I'm adding a "weight" concept on the Edge Collection. Like so : People [ { "_id": "people/100", "_key": "100", "name": "John" }, { "_id": "people/101", "_key":…
Cyril CHAPON
  • 3,556
  • 4
  • 22
  • 40
1
vote
0 answers

How to connect to ArangoDB using NodeJS with docker-compose?

I want to connect my nodejs application to arangodb. I am using arangojs for this. My connection code looks like new Database({ url: `${DB_URL}:${DB_PORT}`, auth: { username: DB_USERNAME, password: DB_PASSWORD } }) Error: connect…
pgalle
  • 216
  • 3
  • 13
1
vote
1 answer

How to merge data from another collection to an array of keys or ids?

Here is the problem I am facing: I am using arangob 3.7 and arangojs driver. I have following collections: collection A { _key, data } collection B { _key, aDataList[A._key] } I have tried the following FOR bdoc IN B FILTER…
1
vote
2 answers

ArangoDB: Join with nested object collection keys

Need some help with ArangoDB join query. I have documents like the following, where User contains Group collection keys in nested object(groups). When I query users, I need to join the group collection and alter response. Should be done WITH QUERY…
Naren
  • 4,152
  • 3
  • 17
  • 28
1
vote
1 answer

ArangoDB AQL: can I traverse a graph from multiple start vertices, but ensure uniqueVertices across all traversals?

I have a graph dataset with large number of relatively small disjoint graphs. I need to find all vertices reachable from a set of vertices matching certain search criteria. I use the following query: FOR startnode IN nodes FILTER startnode._key…
johnc1
  • 11
  • 1
  • 1
1
vote
1 answer

AQL: Bind parameter on operator

Is there a way to have bind parameter on operator ("<", "<=" etc ...) ? I'm working on a Foxx service. Example : const operator = '<' const res = query` FOR v IN myCollection FILTER v.value ${operator} ${maxValue} ` I can do it with db._query…
Erwan
  • 327
  • 4
  • 12
1
vote
1 answer

LIKE operator not supported in arango search view

Arango Search does not seem to support LIKE operator. Other supported operators are working fine. Tried this AQL: FOR s IN searchView SEARCH s.name LIKE "somesubstring" RETURN s But it gives an error saying: Query: AQL: not implemented:…
Kruthika C S
  • 729
  • 1
  • 7
  • 18
1
vote
1 answer

Arango DB query limit can't be more than 1000?

Is there a way to change the default limit of results in arango db? I have a collection with > 1000 records, and it seems impossible to retrieve them all together. I'm using the arangojs driver with node, and I've also tried to run the simple query…
Damian Dominella
  • 610
  • 1
  • 7
  • 16
1
vote
0 answers

ArangoError 2001: not able to connect and work with arangodb using docker?

I am new to Arangodb, and docker realm as well, and I am trying to play with some data in the database using arangosh. But whenever I try to create and issue a command on the DB I get this error: I would really appreciate it if you can explain why…
Ken
  • 65
  • 1
  • 7
1
vote
0 answers

How to get the conflicted field name of ArangoDB

I have a code like this let item = { name: 'Roger' } try { return await collection.save(item) } catch (err) { } Now the collection I'm saving to has a Unique index on the field called name. Now during the exception handling the err object…
nehem
  • 12,775
  • 6
  • 58
  • 84
1
vote
1 answer

what is the return value of ArangoJS collection.save()?

The documentation is located here: Document Manipulation · ArangoDB v3.4.1 Drivers Documentation I see the documentation for collection.replace() and collection.update(), but nothing for collection.save(). I know the save function exits because I'm…
BugBuddy
  • 576
  • 2
  • 5
  • 19
1
vote
1 answer

arangoDb + nodejs: db.useBasicAuth(...) is not a function

So, I have code bellow: const { Database, aql } = require("arangojs"); const db = new Database({· url: 'http://127.0.0.1:8529' } ); db.useBasicAuth('root', 'password1') (async function() { const now = Date.now(); try { const cursor =…
kharandziuk
  • 12,020
  • 17
  • 63
  • 121
1
vote
1 answer

Push/Pull Value(s) to Array in ArangoJS

I'm transitioning to ArangoDB for its power as a graph database and am struggling with the simple stuff. If I have a document... { _id:'1234', tags:['apple','orange'] } how can I update it to push or pull a value from the array? I would expect the…
joshuah7
  • 13
  • 5