回答

1

有几种方法去这样做,但最直接的路线是提供一个graphSourceexecuteGraphqueryOptions参数“A”。源'a'与DSE Graph交流以使用OLAP遍历源(source)。

const client = new Client({ 
    contactPoints: ['127.0.0.1'] 
    profiles: [ 
    new ExecutionProfile('olap', {graphOptions: {source: 'a'}}) 
    ] 
}); 

client.executeGraph('g.V().count()', null, { executionProfile: 'olap' }, function (err, result) { 
}); 

client.executeGraph('g.V().count()', null, {graphSource: 'a'}, function (err, result) { 
    // process result 
}); 

或者,也可以在可重复使用的执行OLAP查询客户端初始化定义ExecutionProfile

相关问题