|
4 | 4 | Interactive console |
5 | 5 | -------------------------------------------------------------------------------- |
6 | 6 |
|
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 |
9 | 10 | without an :ref:`instance file <admin-instance_file>`, |
10 | 11 | or 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, |
12 | 13 | but in fact it can handle both Lua and SQL input. |
| 14 | + |
13 | 15 | The 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>``), |
15 | 17 | the instruction (which can be a Lua request or an SQL statement), |
16 | 18 | and the response (which can be a display in either YAML format or Lua format). |
17 | 19 |
|
@@ -58,33 +60,63 @@ and it may be Lua if |
58 | 60 | the last :ref:`set_default_output <console-set_default_output>` |
59 | 61 | call was ``console.set_default_output('lua')``. |
60 | 62 |
|
61 | | -.. container:: table |
| 63 | +.. container:: table |
62 | 64 |
|
63 | 65 | .. rst-class:: left-align-column-1 |
64 | 66 | .. rst-class:: left-align-column-2 |
65 | 67 | .. rst-class:: left-align-column-3 |
66 | 68 | .. rst-class:: left-align-column-4 |
| 69 | + .. rst-class:: left-align-column-5 |
| 70 | + |
| 71 | + .. list-table:: |
| 72 | + :widths: 15 15 15 20 35 |
| 73 | + :header-rows: 1 |
| 74 | + |
| 75 | + * - Type |
| 76 | + - Lua input |
| 77 | + - Lua output |
| 78 | + - YAML output |
| 79 | + - MsgPack storage |
| 80 | + |
| 81 | + * - scalar |
| 82 | + - :code:`1` |
| 83 | + - :code:`1` |
| 84 | + |
| 85 | + - | :code:`---` |
| 86 | + | :code:`- 1` |
| 87 | + | :code:`...` |
| 88 | +
|
| 89 | + - :code:`\x01` |
| 90 | + |
| 91 | + * - scalar sequence |
| 92 | + - :code:`1, 2, 3` |
| 93 | + - :code:`1, 2, 3` |
| 94 | + |
| 95 | + - | :code:`---` |
| 96 | + | :code:`- 1` |
| 97 | + | :code:`- 2` |
| 98 | + | :code:`- 3` |
| 99 | + | :code:`...` |
| 100 | +
|
| 101 | + - :code:`\x01 \x02 \x03` |
| 102 | + |
| 103 | + * - 2-element table |
| 104 | + - :code:`{1, 2}` |
| 105 | + - :code:`{1, 2}` |
| 106 | + |
| 107 | + - | :code:`---` |
| 108 | + | :code:`- - 1` |
| 109 | + | :literal:`\ - 2` |
| 110 | + | :code:`...` |
| 111 | +
|
| 112 | + - :code:`0x92 0x01 0x02` |
| 113 | + |
| 114 | + * - map |
| 115 | + - :code:`{key = 1}` |
| 116 | + - :code:`{key = 1}` |
67 | 117 |
|
68 | | - +-----------------+-----------------+-----------------+-----------------------+---------------------------------------+ |
69 | | - | Type | Lua input | Lua output | YAML output | MsgPack storage | |
70 | | - +=================+=================+=================+=======================+=======================================+ |
71 | | - | scalar | :code:`1` | :code:`1` | :code:`---` |br| | :code:`\x01` | |
72 | | - | | | | :code:`- 1` |br| | | |
73 | | - | | | | :code:`...` | | |
74 | | - +-----------------+-----------------+-----------------+-----------------------+---------------------------------------+ |
75 | | - | scalar sequence | :code:`1,2,3` | :code:`1,2,3` | :code:`---` |br| | :code:`\x01 \x02 \x03` | |
76 | | - | | | | :code:`- 1` |br| | | |
77 | | - | | | | :code:`- 2` |br| | | |
78 | | - | | | | :code:`- 3` |br| | | |
79 | | - | | | | :code:`...` | | |
80 | | - +-----------------+-----------------+-----------------+-----------------------+---------------------------------------+ |
81 | | - | 2-element table | :code:`{1,2}` | :code:`{1,2}` | :code:`---` |br| | :code:`0x92 0x01 0x02` | |
82 | | - | | | | :code:`- - 1` |br| | | |
83 | | - | | | | :code:`- - 2` |br| | | |
84 | | - | | | | :code:`...` | | |
85 | | - +-----------------+-----------------+-----------------+-----------------------+---------------------------------------+ |
86 | | - | map | :code:`{key=1}` | :code:`{key=1}` | :code:`---` |br| | :code:`\x81 \xa3 \x6b \x65 \x79 \x01` | |
87 | | - | | | | :code:`- key: 1` |br| | | |
88 | | - | | | | :code:`...` | | |
89 | | - +-----------------+-----------------+-----------------+-----------------------+---------------------------------------+ |
| 118 | + - | :code:`---` |
| 119 | + | :code:`- key: 1` |
| 120 | + | :code:`...` |
90 | 121 |
|
| 122 | + - :code:`\x81 \xa3 \x6b \x65 \x79 \x01` |
0 commit comments