Overview
flavius-shell is a cypher interpreter that reads flavius commands from the standard input and executes them. It provides a simple interface for interacting with the flavius database.
Installation
The shell binary can be accessed from the Flavius frontend container.
For example, if the frontend container name is flavius-fe-0-1
, you can access the flavius-shell via the following command
on host machine.
docker exec -it flavius-fe-0-1 /Flavius/frontend/flavius-shell --host <host> --port <port> --user <user> --password <password>
Usage
Usage: flavius-shell [OPTIONS] --user <USER> --password <PASSWORD>
Options:
--host <HOST> frontend host [default: localhost]
--port <PORT> frontend port [default: 30000]
--user <USER> user name
--password <PASSWORD> password
-t <TRACING_ENDPOINT> tracing endpoint(e.g.: http://alloy:4317)
--timezone <TIMEZONE> timezone with following formats: Area/Location(e.g. 'Asia/Shanghai') or ISO 8601 style fixed UTC Offsets(e.g. '+08:00') or 'UTC' (default: 'UTC')
--file <FILE> query statement file to execute
-h, --help Print help
-V, --version Print version
For example, you can connect to flavius via the following command
./flavius-shell --host <host> --port <port> --user <user> --password <password>
Setting session variables
Setting NAMESPACE
The .use NAMESPACE
command sets the current namespace for subsequent queries
.use NAMESPACE <namespace>
Setting GRAPH The .use GRAPH
command sets the current graph for subsequent
queries.
NOTICE: The graph must be created before using it.
.use GRAPH <database>
Reset NAMESPACE and GRAPH
The .reset
command resets the current namespace and graph to the None values.
.reset
Setting Parameters
The .param
command sets a parameter for subsequent queries.
.param <key>=<value>