1 Respuesta
- Más nuevo
- Más votos
- Más comentarios
0
It looks like there was an answer on StackOverflow. Copying that example here to connect the dots.
const gremlin = require('gremlin');
const traversal = gremlin.process.AnonymousTraversalSource.traversal;
const DriverRemoteConnection = gremlin.driver.DriverRemoteConnection;
const direction = gremlin.process.direction
const t = gremlin.process.t
const { onCreate, onMatch } = gremlin.process.merge;
const g = traversal().withRemote(new DriverRemoteConnection('wss://<CLUSTER ENDPOINT>:8182/gremlin'));
g.
mergeE(new Map([[t.label,"Test"],
[direction.out,'1'],[direction.in,'2']])).
option(onCreate,new Map([["created",Date.now()]])).
option(onMatch,new Map([["updated",Date.now()]])).elementMap().toList().then(data => console.log(data))
respondido hace 9 meses
Contenido relevante
- OFICIAL DE AWSActualizada hace 3 años
- OFICIAL DE AWSActualizada hace un año
- OFICIAL DE AWSActualizada hace un año