Non interactive mode
The DBOO manager can be run in non interactive mode directory on the command line or in for example a bash script:
> dboo MyDatabase -u=me -p -- "select<purchase>(gt(amount, 10))"
Before the double dash is the connection parameters; and after comes the command or query. Multiple queries can be run sequentially by separating them with double dashes:
> dboo dboo::server -u=root -p -- create user tom --groups=MyDbGroup -- create database MyDatabase --groups=MyDbGroup
Connection parameters
The connection parameters before the double dash is the same as when connecting for interactive mode:
> dboo <database> [--user=<userid>] [--password[=<password>]] [--host=<host>] [--port=<port>]
If just the ‘–password’ option without the actual password, the user can enter the password at a prompt.
Arguments
Argument |
Explanation |
---|---|
database |
database name |
Options
Option |
Explanation |
---|---|
–user, -u |
user id |
–password, -p |
password |
–host, -h |
host name/ip address |
–port, -P |
port number |
Example
Adding a user and creating a database on one line:
> dboo -u=root -p -- add user tom --groups=MyDbGroup -- create database MyDatabase --groups=MyDbGroup
Logging in as root to dboo::server on localhost:8822.
password:
Added user 'tom'
Created database 'MyDatabase'