📜  OrientDB-控制台模式

📅  最后修改于: 2020-11-26 05:15:34             🧑  作者: Mango


OrientDB控制台是一个Java应用程序,可用于OrientDB数据库和Server实例。 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