I understand that you can create and store a node and then link that node to another node, but how could I query for nodes based on that link/relationship?
E.g.,
```
const alice = await db.put({ name: "Alice", age: 30 });
const bob = await db.put({ name: "Bob", age: 31 });
const cooper = await db.put({ name: "Cooper", age: 29 });
const dwight = await db.put({ name: "Dwight", age: 33 });
await db.link(alice, bob);
await db.link(alice, cooper);
await db.link(cooper, dwight);
const { results } = await db.map({
query: {
'edges.age': { $gt: 30 } // pseudo code
},
});
console.log(results[0].name); // 'Alice'
```I see that an `edges` property is added on result nodes from one of the examples[1] and I'm not familiar with Mongo-style queries[2] to know if there's a better operator, but the query above is meant to find nodes that have connected/edge nodes that have an age greater than 30 (e.g., Bob).
(Also, I'm not sure what it'd look like to check against direct AND indirect edges? e.g., Bob and Dwight)
Anyways, my question/point is, is there support (or plans to support) querying and traverse a directed graph?
[1] https://github.com/estebanrfp/gdb/wiki/.map()#b-query-langua... [2] https://estebanrfp.github.io/gdb/examples/testlinks.html
catoAppreciator•20h ago
estebanrfp•11h ago