回答

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

相關問題