44Interactive console
55--------------------------------------------------------------------------------
66
7- The "interactive console" is Tarantool's basic "command-line interface" for entering requests
8- and seeing results. It is what users see when they start the server
7+ The interactive console is Tarantool's basic command-line interface for entering requests
8+ and seeing results.
9+ It is what users see when they start the server
910without an :ref: `instance file <admin-instance_file >`,
1011or start :ref: `tarantoolctl <tarantoolctl >` with ``enter ``.
11- It is often called the Lua console to distinguish it from the administrative console,
12+ The interactive console is often called the Lua console to distinguish it from the administrative console,
1213but in fact it can handle both Lua and SQL input.
14+
1315The majority of examples in this manual show what users see with the
14- interactive console, including the prompt (which can be " tarantool> " ),
16+ interactive console, including the prompt (which can be `` tarantool> `` ),
1517the instruction (which can be a Lua request or an SQL statement),
1618and the response (which can be a display in either YAML format or Lua format).
1719
@@ -64,6 +66,7 @@ call was ``console.set_default_output('lua')``.
6466 .. rst-class :: left-align-column-2
6567 .. rst-class :: left-align-column-3
6668 .. rst-class :: left-align-column-4
69+ .. rst-class :: left-align-column-5
6770
6871 +-----------------+-----------------+-----------------+-----------------------+---------------------------------------+
6972 | Type | Lua input | Lua output | YAML output | MsgPack storage |
@@ -80,11 +83,76 @@ call was ``console.set_default_output('lua')``.
8083 +-----------------+-----------------+-----------------+-----------------------+---------------------------------------+
8184 | 2-element table | :code: `{1,2} ` | :code: `{1,2} ` | :code: `--- ` |br | | :code: `0x92 0x01 0x02 ` |
8285 | | | | :code: `- - 1 ` |br | | |
83- | | | | :code: `- - 2 ` |br | | |
86+ | | | | :code: `\ - 2 ` |br | | |
8487 | | | | :code: `... ` | |
8588 +-----------------+-----------------+-----------------+-----------------------+---------------------------------------+
8689 | map | :code: `{key=1} ` | :code: `{key=1} ` | :code: `--- ` |br | | :code: `\x 81 \x a3 \x 6b \x 65 \x 79 \x 01 ` |
8790 | | | | :code: `- key: 1 ` |br | | |
8891 | | | | :code: `... ` | |
8992 +-----------------+-----------------+-----------------+-----------------------+---------------------------------------+
9093
94+ .. role :: lua(code)
95+ :language: lua
96+
97+ .. container :: table
98+
99+ .. list-table ::
100+ :widths: 15 15 15 20 35
101+ :header-rows: 1
102+
103+ * - Type
104+ - Lua input
105+ - Lua output
106+ - YAML output
107+ - MsgPack storage
108+
109+ * - scalar
110+ - :lua: `1 `
111+ - :lua: `1 `
112+
113+ - .. code-block:: yaml
114+
115+ ---
116+ - 1
117+ ...
118+
119+ - :code: `\x 01 `
120+
121+ * - scalar sequence
122+ - :lua: `1, 2, 3 `
123+ - :lua: `1, 2, 3 `
124+
125+ - .. code-block:: yaml
126+
127+ ---
128+ - 1
129+ - 2
130+ - 3
131+ ...
132+
133+ - :code: `\x 01 \x 02 \x 03 `
134+
135+ * - 2-element table
136+ - :lua: `{1, 2} `
137+ - :lua: `{1, 2} `
138+
139+ - .. code-block:: yaml
140+
141+ ---
142+ - - 1
143+ - 2
144+ ...
145+
146+ - :code: `0x92 0x01 0x02 `
147+
148+ * -
149+ -
150+ -
151+ -
152+ -
153+
154+ * -
155+ -
156+ -
157+ -
158+ -
0 commit comments