OrientDB控制臺是針對OrientDB資料庫和服務器實例的Java應用程式。 OrientDB支持幾種控制臺模式。
交互模式
這是默認模式。 只需通過執行以下腳本bin/console.sh
(或MS Windows系統中的bin/console.bat
)來啟動控制臺。 確保有執行許可權。
OrientDB console v.1.6.6 www.orientechnologies.com
Type 'help' to display all the commands supported.
orientdb>
完成後,控制臺已準備好接受命令。
批處理模式
要以批處理模式執行命令,請運行以下bin/console.sh
(或MS Windows系統中的bin/console.bat
)腳本,以便以分號;
分隔所有命令。
orientdb> console.bat "connect remote:localhost/demo;select * from profile"
或者調用控制臺腳本以包含要執行的命令列表的文本格式傳遞檔的名稱。 命令必須用分號;
分隔。
示例
假設檔:command.txt
包含要通過OrientDB控制臺執行的命令列表。 以下命令接受來自command.txt
檔的一批命令。
orientdb> console.bat commands.txt
在批處理模式下,可以忽略錯誤以通過將ignoreErrors
變數設置為true
來讓腳本繼續執行。
orientdb> set ignoreErrors true
啟用Echo
當您在管道中運行控制臺命令時,需要顯示它們。 通過在開始處將其設置為屬性來啟用命令的“回顯”。 以下是在OrientDB控制臺中啟用echo
屬性的語法。
orientdb> set echo true
上一篇:
OrientDB數據類型
下一篇:
OrientDB創建資料庫