tntcall <connection_string> <function_name> [ARG|SEP][, ARG|SEP]...
tntcall <connection_string> -e <script_to_eval> [ARG|SEP][, ARG|SEP]...
tntcall <connection_string> -f <file_to_eval> [ARG|SEP][, ARG|SEP]...
ARG
-n
nil
[-i ]<arg>
integer(-i) or string <arg>
SEP
-A
begin array
-a
end array
-M
begin map
-m
end map
Outputs json-like formatted data by means of msgpuck's mp_snprint(). You may try to use jq to deal with the output.
Besides connection string format described here
there is another option: env/:<environment_variable_name>
.
$ ./tntcall 'user:[email protected]:3301' -e 'local a,b = ...; return a+b, a-b, {ok=true}' -i 3 -i 2
> [5, 1, {"ok": true}]
$ ./tntcall 'user:[email protected]:3301' -e 'return table.concat({...})' hello \ world
> "hello world"
$ ./tntcall 'user:[email protected]:3301' os.date '%A %B %d'
> "Friday November 29"
$ ./tntcall 'user:[email protected]:3301' -e 'return ...' -i 123
> 123
$ ./tntcall 'user:[email protected]:3301' box.cfg -M memtx_memory -i 2147483648 -m
>
$ ./tntcall 'user:[email protected]:3301' -e 'return box.cfg.memtx_memory'
> 2147483648