OrientDB教程

OrientDB 控制台模式

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

启用回声

在管道中运行控制台命令时,您需要显示它们。通过在开始时将其设置为属性来启用命令的"回显"。以下是在 OrientDB 控制台中启用 echo 属性的语法。
orientdb> set echo true
昵称: 邮箱:
Copyright © 2022 立地货 All Rights Reserved.
备案号:京ICP备14037608号-4