tobaseru
tobaseru
ATApache TinkerPop
Created by tobaseru on 3/2/2024 in #questions
Discrepancy between console server id conventions and Neptune
No description
6 replies
ATApache TinkerPop
Created by tobaseru on 11/28/2023 in #questions
Is the following use of next() allowed?
The update does not seem to work in this case, even when changes is a non-empty object. No error is raised, and when I printed the result, it has { value : null, done : true }.

const changes = { ... }
let v0 = g.V(0);
if (!(await v0.next()).value) {
throw Error("Vertex not found.")
}
for (const [key, value] of Object.entries(changes)) {
v0 = v0.property(key, value);
}
await v0.next();

const changes = { ... }
let v0 = g.V(0);
if (!(await v0.next()).value) {
throw Error("Vertex not found.")
}
for (const [key, value] of Object.entries(changes)) {
v0 = v0.property(key, value);
}
await v0.next();
4 replies
ATApache TinkerPop
Created by tobaseru on 11/17/2023 in #questions
repeat and until methods in Javascript Gremlin:
I'm not particularly sure how to use them properly. From my current understanding, repeat() and until() are both instance methods of the GraphTraversal class, but how do I reference any methods within the class body but still refer to the same reference?
const org = await g.V().until((r) => r.hasLabel('')).repeat({...}).path().by('name').next()

const org = await g.V().until((r) => r.hasLabel('')).repeat({...}).path().by('name').next()

What goes in the {...}? (If possible, can I see which imports you used if any in order to reference it completely? Much thanks.) For context, I'm trying to continue along in-edges until I reach a vertex labelled "b".
5 replies