Skip to content
Snippets Groups Projects
Commit fd9b0db4 authored by bigbes's avatar bigbes
Browse files

Add other site pages

parent 3df0eb7c
No related branches found
No related tags found
No related merge requests found
Showing
with 36 additions and 17 deletions
...@@ -14,8 +14,6 @@ ...@@ -14,8 +14,6 @@
{% set render_sidebar = true %} {% set render_sidebar = true %}
{% endif %} {% endif %}
{% set render_sidebar = false %}
{% block content %} {% block content %}
{% if render_sidebar %} {% if render_sidebar %}
<section class="b-lightgray_block b-documentation_top b-clearbox p-documentation_in"> <section class="b-lightgray_block b-documentation_top b-clearbox p-documentation_in">
......
...@@ -33,7 +33,7 @@ used this way, ``tarantool`` is a client program as well as a server program. ...@@ -33,7 +33,7 @@ used this way, ``tarantool`` is a client program as well as a server program.
This section shows all legal syntax for the tarantool program, with short notes This section shows all legal syntax for the tarantool program, with short notes
and examples. Other client programs may have similar options and request and examples. Other client programs may have similar options and request
syntaxes. Some of the information in this section is duplicated in the syntaxes. Some of the information in this section is duplicated in the
`Configuration Reference`_ chapter. :doc:`/book/configuration` chapter.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Conventions used in this section Conventions used in this section
...@@ -101,6 +101,8 @@ single quotes. Double quotes are legal but single quotes are preferred. ...@@ -101,6 +101,8 @@ single quotes. Double quotes are legal but single quotes are preferred.
Enclosing in double square brackets is good for multi-line strings as Enclosing in double square brackets is good for multi-line strings as
described in `Lua documentation`_. described in `Lua documentation`_.
.. _Lua documentation: http://www.lua.org/pil/2.4.html
Example: Example:
.. code-block:: lua .. code-block:: lua
...@@ -116,6 +118,8 @@ Single-byte tokens are: * or , or ( or ). Examples: * , ( ). ...@@ -116,6 +118,8 @@ Single-byte tokens are: * or , or ( or ). Examples: * , ( ).
Tokens must be separated from each other by one or more spaces, except that Tokens must be separated from each other by one or more spaces, except that
spaces are not necessary around single-byte tokens or string literals. spaces are not necessary around single-byte tokens or string literals.
.. _setting delimiter:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Requests Requests
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...@@ -141,10 +145,13 @@ To go back to normal mode: ``console.delimiter('')string-literal``. Example: ...@@ -141,10 +145,13 @@ To go back to normal mode: ``console.delimiter('')string-literal``. Example:
console.delimiter('')! console.delimiter('')!
For a condensed Backus-Naur Form [BNF] description of the suggested form of For a condensed Backus-Naur Form [BNF] description of the suggested form of
client requests, see `doc/box-protocol.html`_ and `doc/sql.txt`_. client requests, see `doc/dev_guide/box-protocol.html`_.
.. _doc/dev_guide/box-protocol.html: http://tarantool.org/doc/dev_guide/box-protocol.html
In *interactive* mode, one types requests and gets results. Typically the In *interactive* mode, one types requests and gets results. Typically the
requests are typed in by the user following prompts. Here is an example of an interactive-mode tarantool client session: requests are typed in by the user following prompts. Here is an example of
an interactive-mode tarantool client session:
.. code-block:: bash .. code-block:: bash
......
...@@ -12,6 +12,10 @@ All such messages, however, are logged in the error log. Below follow only gener ...@@ -12,6 +12,10 @@ All such messages, however, are logged in the error log. Below follow only gener
descriptions of some popular codes. A complete list of errors can be found in file descriptions of some popular codes. A complete list of errors can be found in file
`errcode.h`_ in the source tree. `errcode.h`_ in the source tree.
.. _errcode.h: https://github.com/tarantool/tarantool/blob/master/src/box/errcode.h
.. _ER_MEMORY_ISSUE:
=========================================================== ===========================================================
List of error codes List of error codes
=========================================================== ===========================================================
...@@ -23,7 +27,7 @@ ER_ILLEGAL_PARAMS ...@@ -23,7 +27,7 @@ ER_ILLEGAL_PARAMS
Illegal parameters. Malformed protocol message. Illegal parameters. Malformed protocol message.
ER_MEMORY_ISSUE ER_MEMORY_ISSUE
Out of memory: `slab_alloc_arena`_ limit is reached. Out of memory: :ref:`slab_alloc_arena` limit is reached.
ER_WAL_IO ER_WAL_IO
Failed to write to disk. May mean: failed to record a change in the Failed to write to disk. May mean: failed to record a change in the
......
...@@ -18,10 +18,10 @@ A Tarantool server process title follows the following naming scheme: ...@@ -18,10 +18,10 @@ A Tarantool server process title follows the following naming scheme:
* **running** -- ordinary node "ready to accept requests", * **running** -- ordinary node "ready to accept requests",
* **loading** -- ordinary node recovering from old snap and wal files, * **loading** -- ordinary node recovering from old snap and wal files,
* **orphan** -- not in a cluster, * **orphan** -- not in a cluster,
* **hot_standby** -- see section `local_hot_standby`_, * **hot_standby** -- see section :ref:`local_hot_standby`,
* **dumper + process-id** -- saving files before exiting, * **dumper + process-id** -- saving files before exiting,
* **spawner** -- controls other processes, * **spawner** -- controls other processes,
* **replica + URI/status** -- replication node accepting connections on `replication_port`_, * **replica + URI/status** -- replication node accepting connections on :ref:`replication_port`,
* **relay + sockaddr** -- serves a single replication connection, * **relay + sockaddr** -- serves a single replication connection,
For example: For example:
......
...@@ -27,9 +27,9 @@ learning, type the statements in with the tarantool client while reading along. ...@@ -27,9 +27,9 @@ learning, type the statements in with the tarantool client while reading along.
Configure Configure
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
We are going to use the "tarantool_sandbox" that was created in section `Starting We are going to use the "tarantool_sandbox" that was created in section
Tarantool and making your first database`_. So there is a single space, and a :ref:`first database`. So there is a single space, and a numeric primary key,
numeric primary key, and a running tarantool server which also serves as a client. and a running tarantool server which also serves as a client.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Delimiter Delimiter
...@@ -46,6 +46,8 @@ not send to the server until you see an exclamation mark.” ...@@ -46,6 +46,8 @@ not send to the server until you see an exclamation mark.”
From now on it will be possible to use multiple-line statements, but it will be From now on it will be possible to use multiple-line statements, but it will be
necessary to end all statements with exclamation marks. necessary to end all statements with exclamation marks.
.. _declare a delimiter: :ref:`setting delimiter`
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Create a function that returns string Create a function that returns string
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...@@ -335,7 +337,7 @@ a SELECT request. ...@@ -335,7 +337,7 @@ a SELECT request.
box.space.tester:select{1}! box.space.tester:select{1}!
For more about Tarantool insert and replace calls, see Tarantool manual section For more about Tarantool insert and replace calls, see Tarantool manual section
`Package `box.space``_. :mod:`box.space`
The screen now looks like this: The screen now looks like this:
...@@ -528,6 +530,9 @@ string, and the parameter is t[2] which is a reference to a JSON string. There's ...@@ -528,6 +530,9 @@ string, and the parameter is t[2] which is a reference to a JSON string. There's
a bit of hard coding here, we're assuming that the second field in the tuple is a bit of hard coding here, we're assuming that the second field in the tuple is
where the JSON string was inserted. For example, we're assuming a tuple looks like where the JSON string was inserted. For example, we're assuming a tuple looks like
.. _index.iterator: :func:`box.space.space-name.index[.index-name]:pairs`
.. _protected call: http://www.lua.org/pil/8.4.html
.. code-block:: json .. code-block:: json
field[1]: 444 field[1]: 444
...@@ -557,7 +562,7 @@ the database is in perfect shape can skip this kind of thing. ...@@ -557,7 +562,7 @@ the database is in perfect shape can skip this kind of thing.
And the function is complete. Time to test it. Starting with an empty database, And the function is complete. Time to test it. Starting with an empty database,
defined the same way as the sandbox database that was introduced in defined the same way as the sandbox database that was introduced in
`Starting Tarantool and making your first database`_ ”, :ref:`first database` ”,
.. code-block:: lua .. code-block:: lua
......
...@@ -23,6 +23,9 @@ DBMS, and Tarantool. ...@@ -23,6 +23,9 @@ DBMS, and Tarantool.
It will be necessary to build Tarantool from source, as described in It will be necessary to build Tarantool from source, as described in
“ `Building from source`_ ” “ `Building from source`_ ”
.. _Tarantool Plugin API wiki page: https://github.com/tarantool/tarantool/wiki/Plugin-API
.. _Building from source: :doc:`/dev_guide/building_from_source`
The Tarantool plugins allow for connecting to an SQL server and executing SQL The Tarantool plugins allow for connecting to an SQL server and executing SQL
statements the same way that a MySQL or PostgreSQL client does. The SQL statements the same way that a MySQL or PostgreSQL client does. The SQL
statements are visible as Lua methods. Thus Tarantool can serve as a "MySQL Lua statements are visible as Lua methods. Thus Tarantool can serve as a "MySQL Lua
......
...@@ -10,7 +10,7 @@ A reference description also follows below: ...@@ -10,7 +10,7 @@ A reference description also follows below:
.. function:: box.snapshot() .. function:: box.snapshot()
Take a snapshot of all data and store it in _`snap_dir`/<latest-lsn>.snap. Take a snapshot of all data and store it in `snap_dir`_/<latest-lsn>.snap.
To take a snapshot, Tarantool first enters the delayed garbage collection To take a snapshot, Tarantool first enters the delayed garbage collection
mode for all data. In this mode, tuples which were allocated before the mode for all data. In this mode, tuples which were allocated before the
snapshot has started are not freed until the snapshot has finished. To snapshot has started are not freed until the snapshot has finished. To
...@@ -23,7 +23,7 @@ A reference description also follows below: ...@@ -23,7 +23,7 @@ A reference description also follows below:
saved in a matter of minutes. Note, that as long as there are any changes to saved in a matter of minutes. Note, that as long as there are any changes to
the parent index memory through concurrent updates, there are going to be the parent index memory through concurrent updates, there are going to be
page splits, and therefore one needs to have some extra free memory to run page splits, and therefore one needs to have some extra free memory to run
this command. 10% of _`slab_alloc_arena` is, on average, sufficient. This this command. 10% of `slab_alloc_arena`_ is, on average, sufficient. This
statement waits until a snapshot is taken and returns operation result. statement waits until a snapshot is taken and returns operation result.
.. code-block:: lua .. code-block:: lua
...@@ -61,3 +61,6 @@ A reference description also follows below: ...@@ -61,3 +61,6 @@ A reference description also follows below:
.. function:: require('fiber').info() .. function:: require('fiber').info()
Show all running fibers, with their stack. Mainly useful for debugging. Show all running fibers, with their stack. Mainly useful for debugging.
.. _snap_dir: :ref:`snap_dir`
.. _slab_alloc_arena: :ref:`slab_alloc_arena`
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
The `box` library Database
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
As well as executing Lua chunks or defining their own functions, users can exploit As well as executing Lua chunks or defining their own functions, users can exploit
...@@ -21,7 +21,6 @@ no arguments. The packages inside the box library are: ...@@ -21,7 +21,6 @@ no arguments. The packages inside the box library are:
box_index box_index
box_session box_session
box_error box_error
box_tuple
box_introspection box_introspection
net_box net_box
admin admin
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment