【发布时间】:2017-03-26 19:16:17
【问题描述】:
在 Node 中,对数据库执行 Gremlin 查询的正确方法是什么?
我目前使用Official Node OrientDB Driver的尝试:
const { ODatabase } = require('orientjs');
const db = new ODatabase({...});
db.query('g.V()')
.then(console.log, console.error);
我得到:
OrientDB.RequestError:
Cannot find a command executor for the command request: sql.g.V()
DB name="mynevo"
at child.Operation.parseError
(.../orientjs/lib/transport/binary/protocol33/operation.js:864:13)
但是,当我在 Web 界面中执行 g.V() 时,它运行良好。
显然,Node 驱动程序或服务器假定查询应该是 SQL。有没有办法告诉它是 Gremlin,还是有其他方法?
【问题讨论】: