Gremlin, [removed] where is the function “valueMap()” imported from?

前端 未结 1 1299
北荒
北荒 2021-01-19 08:26

I am using es6 on nodejs, and am trying to execute the project() step in a gremlin query.

As part of the projection, I want to extract the properties.

Using

相关标签:
1条回答
  • 2021-01-19 08:50

    valueMap(), outV() and similar traversals are spawned anonymously from a double underscore class - __ - so your code could be re-written as:

    const gremlin = require('gremlin');
    const __ = gremlin.process.statics;
    
    g.V('test-id')  
        .bothE()  
        .limit(10)  
        .project('id', 'properties', 'out', 'in')  
        .by(id)  
        .by(__.valueMap())  
        .by(__.outV().id())  
        .by(__.inV().id()) 
    
    0 讨论(0)
提交回复
热议问题