English 中文(简体)
OrientDB Tutorial

OrientDB Database Commands

OrientDB Record Commands

OrientDB Class Commands

OrientDB Cluster Commands

OrientDB Property Commands

OrientDB Vertex Commands

OrientDB Edge Commands

OrientDB Advanced Concepts

OrientDB Interfaces

OrientDB Useful Resources

Selected Reading

OrientDB - Console Modes
  • 时间:2024-10-18

OrientDB - Console Modes


Previous Page Next Page  

The OrientDB Console is a Java Apppcation 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 pst of commands to execute. Commands must be separated with semicolon ";".

Example

Command.txt contains the pst 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 

In batch mode, you can ignore errors to let the script continue the execution by setting the "ignoreErrors" variable to true.

orientdb> set ignoreErrors true

Enable Echo

When you run console commands in pipepne, you will need to display them. Enable "echo" of commands by setting it as property at the beginning. Following is the syntax to enable echo property in OrientDB console.

orientdb> set echo true
Advertisements