repl
Usage: chr repl [<options>] [<script>] [<args>]...
REPL is used to create a language shell for Rell that takes single user
inputs, executes them, and returns the result. Inside the repl you can create
local variables and execute Rell commands, it can be attached to a Rell
module to be able to inspect a dapp state and execute dapp functionalities.
Run query commands: To be able to run queries in the shell, a user must have
a module defined from the start of the repl command in which the query is
defined. Queries that do not depend on entities can be executed without a
database connection, and queries that depend on an entity must then have a
database connection defined.
Run Operations commands: When a operation is executed from the repl shell,
the database connection and a module needs to be defined from the start of
the repl command, to be able to execute an operation it needs added to a
transaction. This can be done by wrapping it with a test transaction like
this: rell.test.tx(<your operation>..).run()
Rell scripts: You can specify a file with Rell statements which will be read
and executed (specifying - will read from standard input). Command line
arguments can be specified and will be available as args: list<text>. This
can not be combined with the -c option. Support for Rell scripts is
experimental and may be changed or removed at any time.
Configuration Properties:
-s, --settings=<settings> Alternate path for project settings file
Options:
-m, --module=<module> Name of module
--sql-log Log sql expressions
--history-file=<path> Save command history to this file
--use-db If a session towards the configured database should
be established
-c, --command=<command> Execute a single command
-r, --raw-output Will print large object line by line and strings
without quotes (deprecated)
-f, --output-format=(pretty|raw|JSON|XML|YAML)
Output format
-d, --duration Print duration of the execution
-h, --help Show this message and exit
Arguments:
<script> Script file
<args> Arguments to script
You can use the repl command (chr repl
) to run specific Rell methods in the shell, which can be suitable for
troubleshooting.