2016-07-08 96 views
1

我想作爲orientjs docs建議執行與orientjs批處理腳本,但我得到了以下錯誤:批處理腳本不起作用

Unhandled rejection OrientDB.RequestError: Cannot find a command executor for the command request: sql.begin;let $susers = select from susers;return $susers 
    Storage URL="plocal:/Users/amyth/projects/orient/orientdb-community-2.2.0/databases/konnect" 
    at Operation.parseError (/Users/amyth/projects/konnect/node_modules/orientjs/lib/transport/binary/protocol33/operation.js:865:13) 
    at Operation.consume (/Users/amyth/projects/konnect/node_modules/orientjs/lib/transport/binary/protocol33/operation.js:455:35) 
    at Connection.process (/Users/amyth/projects/konnect/node_modules/orientjs/lib/transport/binary/connection.js:399:17) 
    at Connection.handleSocketData (/Users/amyth/projects/konnect/node_modules/orientjs/lib/transport/binary/connection.js:290:20) 
    at emitOne (events.js:96:13) 
    at Socket.emit (events.js:188:7) 
    at readableAddChunk (_stream_readable.js:172:18) 
    at Socket.Readable.push (_stream_readable.js:130:10) 
    at TCP.onread (net.js:542:20 

對於作爲簡單的腳本:

begin;let $susers = select from susers;return $susers 

我做錯了什麼?或者這是一個錯誤?

+0

您好,我嘗試你的情況和我有同樣的問題,你可以打開問題? –

回答

3

嘗試

db.query("begin;let $susers = select from susers;return $susers",{class: 's'}).then(function(res){ 
console.log(res) 
}) 

似乎文檔最近已更改留出了 {類:「S」}

+0

感謝哥們。指引我朝着正確的方向。接受答案。 – Amyth