Orientdb 简明教程

OrientDB - Console Modes

The OrientDB Console is a Java Application made to work against OrientDB databases and Server instances. There are several console modes that OrientDB supports.

Interactive Mode

This is the default mode. Just launch the console by executing the following script bin/console.sh (or bin/console.bat in MS Windows systems). Make sure to have execution permission on it.

OrientDB console v.1.6.6 www.orientechnologies.com
Type 'help' to display all the commands supported.

orientdb>

Once done, the console is ready to accept commands.

Batch Mode

To execute commands in batch mode run the following bin/console.sh (or bin/console.bat in MS Windows systems) script passing all the commands separated with semicolon ";".

orientdb> console.bat "connect remote:localhost/demo;select * from profile"

Or call the console script passing the name of the file in text format containing the list of commands to execute. Commands must be separated with semicolon ";".

Example

Command.txt contains the list of commands which you want to execute through OrientDB console. The following command accepts the batch of commands from the command.txt file.

orientdb> console.bat commands.txt

在批处理模式下,通过将“ignoreErrors”变量设置为 true,可以忽略错误,让脚本继续执行。

orientdb> set ignoreErrors true

Enable Echo

在管道中运行控制台命令时,你需要显示它们。在开始的时候将“echo”设置为属性,即可启用“echo”命令。以下是 OrientDB 控制台中启用 echo 属性的语法。

orientdb> set echo true