mirror of https://gitee.com/bigwinds/arangodb
68 lines
3.5 KiB
Plaintext
68 lines
3.5 KiB
Plaintext
!CHAPTER Details about the ArangoDB Shell
|
||
|
||
After the server has been [started](../FirstSteps/Arangod.html#details_about_the_arangodb_server),
|
||
you can use the ArangoDB shell (_arangosh_) to administrate the
|
||
server. Without any arguments, the ArangoDB shell will try to contact
|
||
the server on port 8529 on the localhost. For more information see the
|
||
[ArangoDB Shell documentation](../Arangosh/README.md). You might need to set additional options
|
||
(endpoint, username and password) when connecting:
|
||
|
||
```
|
||
unix> ./arangosh --server.endpoint tcp://127.0.0.1:8529 --server.username root
|
||
```
|
||
|
||
The shell will print its own version number and – if successfully connected
|
||
to a server – the version number of the ArangoDB server.
|
||
|
||
!SECTION Command-Line Options
|
||
|
||
Use `--help` to get a list of command-line options:
|
||
|
||
```
|
||
unix> ./arangosh --help
|
||
STANDARD options:
|
||
--audit-log <string> audit log file to save commands and results to
|
||
--configuration <string> read configuration file
|
||
--help help message
|
||
--max-upload-size <uint64> maximum size of import chunks (in bytes) (default: 500000)
|
||
--no-auto-complete disable auto completion
|
||
--no-colors deactivate color support
|
||
--pager <string> output pager (default: "less -X -R -F -L")
|
||
--pretty-print pretty print values
|
||
--quiet no banner
|
||
--temp-path <string> path for temporary files (default: "/tmp/arangodb")
|
||
--use-pager use pager
|
||
|
||
JAVASCRIPT options:
|
||
--javascript.check <string> syntax check code JavaScript code from file
|
||
--javascript.execute <string> execute JavaScript code from file
|
||
--javascript.execute-string <string> execute JavaScript code from string
|
||
--javascript.startup-directory <string> startup paths containing the JavaScript files
|
||
--javascript.unit-tests <string> do not start as shell, run unit tests instead
|
||
--jslint <string> do not start as shell, run jslint instead
|
||
|
||
LOGGING options:
|
||
--log.level <string> log level (default: "info")
|
||
|
||
CLIENT options:
|
||
--server.connect-timeout <double> connect timeout in seconds (default: 3)
|
||
--server.disable-authentication <bool> disable authentication (default: false)
|
||
--server.endpoint <string> endpoint to connect to, use 'none' to start without a server (default: "tcp://127.0.0.1:8529")
|
||
--server.password <string> password to use when connecting (leave empty for prompt)
|
||
--server.request-timeout <double> request timeout in seconds (default: 300)
|
||
--server.username <string> username to use when connecting (default: "root")
|
||
```
|
||
|
||
!SECTION Database Wrappers
|
||
The *db*-Object is available in *arangosh* as well as on *arangod* i.e. if you're using [Foxx](../Foxx/README.md). While its Interface is persistant bewteen the *arangosh* and the *arangod* implementations, its underpinning are not. The *arangod* implementation is JavaScript wrappers around ArangoDBs native C++ implementation, the *arangosh* implementation wraps HTTP-Accesses to [ArangoDBs RESTfull API](../HttpApi/README.md).
|
||
|
||
So while this code may produce similar results when executed in *arangosh* and *arangod*, the cpu-usage and time required will be really different:
|
||
|
||
```js
|
||
for (i = 0; i < 100000; i++) {
|
||
db.test.save({ name: { first: "Jan" }, count: i});
|
||
}
|
||
```
|
||
|
||
Since the *arangosh* version will be doing around 100k HTTP-Requests, and the *arangod* version [will directly write to the database](../Advanced/ServerInternals.md).
|