Skip to content

Commit 5dea181

Browse files
authored
New TOC structure (#1552)
1 parent d9a1e72 commit 5dea181

23 files changed

+482
-357
lines changed

doc/book/admin/index.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.. _admin:
22

33
********************************************************************************
4-
Server administration
4+
Administration
55
********************************************************************************
66

77
Tarantool is designed to have multiple running instances on the same host.
@@ -36,3 +36,4 @@ This chapter includes the following sections:
3636
os_notes
3737
bug_reports
3838
troubleshoot
39+
../monitoring/index

doc/book/app_server/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Application server
55
********************************************************************************
66

7-
In this chapter, we introduce the basics of working with Tarantool as a Lua
7+
Here we introduce the basics of working with Tarantool as a Lua
88
application server.
99

1010
This chapter contains the following sections:

doc/book/box/atomic.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.. _atomic-atomic_execution:
22

33
================================================================================
4-
Transaction control
4+
Transactions
55
================================================================================
66

77
Transactions in Tarantool occur in **fibers** on a single **thread**.

doc/book/box/atomic_index.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.. _atomic-atomic_execution:
2+
3+
================================================================================
4+
Transaction control
5+
================================================================================
6+
7+
.. include:: atomic.rst

doc/book/box/authentication_index.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.. _authentication:
2+
3+
================================================================================
4+
Access control
5+
================================================================================
6+
7+
.. include:: authentication.rst

doc/book/box/data_model.rst

Lines changed: 1 addition & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -61,77 +61,13 @@ When Tarantool returns a tuple value in console, it uses the
6161
`YAML <https://en.wikipedia.org/wiki/YAML>`_ format,
6262
for example: ``[3, 'Ace of Base', 1993]``.
6363

64-
6564
.. _index-box_index:
6665

6766
--------------------------------------------------------------------------------
6867
Index
6968
--------------------------------------------------------------------------------
7069

71-
An **index** is a group of key values and pointers.
72-
73-
As with spaces, you should specify the index **name**, and let Tarantool
74-
come up with a unique **numeric identifier** ("index id").
75-
76-
An index always has a **type**. The default index type is 'TREE'.
77-
TREE indexes are provided by all Tarantool engines, can index unique and
78-
non-unique values, support partial key searches, comparisons and ordered results.
79-
Additionally, memtx engine supports HASH, RTREE and BITSET indexes.
80-
81-
An index may be **multi-part**, that is, you can declare that an index key value
82-
is composed of two or more fields in the tuple, in any order.
83-
For example, for an ordinary TREE index, the maximum number of parts is 255.
84-
85-
An index may be **unique**, that is, you can declare that it would be illegal
86-
to have the same key value twice.
87-
88-
The first index defined on a space is called the **primary key index**,
89-
and it must be unique. All other indexes are called **secondary indexes**,
90-
and they may be non-unique.
91-
92-
An index definition may include identifiers of tuple fields and their expected
93-
**types** (see allowed :ref:`indexed field types <index-box_indexed-field-types>`
94-
below).
95-
96-
.. NOTE::
97-
98-
A recommended design pattern for a data model is to base primary keys on the
99-
first fields of a tuple, because this speeds up tuple comparison.
100-
101-
In our example, we first defined the primary index (named 'primary') based on
102-
field #1 of each tuple:
103-
104-
.. code-block:: tarantoolsession
105-
106-
tarantool> i = s:create_index('primary', {type = 'hash', parts = {{field = 1, type = 'unsigned'}}}
107-
108-
The effect is that, for all tuples in space 'tester', field #1 must exist and
109-
must contain an unsigned integer.
110-
The index type is 'hash', so values in field #1 must be unique, because keys
111-
in HASH indexes are unique.
112-
113-
After that, we defined a secondary index (named 'secondary') based on field #2
114-
of each tuple:
115-
116-
.. code-block:: tarantoolsession
117-
118-
tarantool> i = s:create_index('secondary', {type = 'tree', parts = {2, 'string'}})
119-
120-
The effect is that, for all tuples in space 'tester', field #2 must exist and
121-
must contain a string.
122-
The index type is 'tree', so values in field #2 must not be unique, because keys
123-
in TREE indexes may be non-unique.
124-
125-
.. NOTE::
126-
127-
Space definitions and index definitions are stored permanently in Tarantool's
128-
system spaces :ref:`_space <box_space-space>` and :ref:`_index <box_space-index>`
129-
(for details, see reference on :ref:`box.space <box_space>` submodule).
130-
131-
You can add, drop, or alter the definitions at runtime, with some restrictions.
132-
See syntax details in reference on :ref:`box <box-module>` module.
133-
134-
Read more about index operations :ref:`below <index-box_index-operations>`.
70+
.. include:: indexes.rst
13571

13672
.. _index-box_data-types:
13773

doc/book/box/indexes.rst

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
********************************************************************************
2+
Indexes
3+
********************************************************************************
4+
5+
An **index** is a group of key values and pointers.
6+
7+
As with spaces, you should specify the index **name**, and let Tarantool
8+
come up with a unique **numeric identifier** ("index id").
9+
10+
An index always has a **type**. The default index type is 'TREE'.
11+
TREE indexes are provided by all Tarantool engines, can index unique and
12+
non-unique values, support partial key searches, comparisons and ordered results.
13+
Additionally, memtx engine supports HASH, RTREE and BITSET indexes.
14+
15+
An index may be **multi-part**, that is, you can declare that an index key value
16+
is composed of two or more fields in the tuple, in any order.
17+
For example, for an ordinary TREE index, the maximum number of parts is 255.
18+
19+
An index may be **unique**, that is, you can declare that it would be illegal
20+
to have the same key value twice.
21+
22+
The first index defined on a space is called the **primary key index**,
23+
and it must be unique. All other indexes are called **secondary indexes**,
24+
and they may be non-unique.
25+
26+
An index definition may include identifiers of tuple fields and their expected
27+
**types** (see allowed :ref:`indexed field types <index-box_indexed-field-types>`
28+
below).
29+
30+
.. NOTE::
31+
32+
A recommended design pattern for a data model is to base primary keys on the
33+
first fields of a tuple, because this speeds up tuple comparison.
34+
35+
In our example, we first defined the primary index (named 'primary') based on
36+
field #1 of each tuple:
37+
38+
.. code-block:: tarantoolsession
39+
40+
tarantool> i = s:create_index('primary', {type = 'hash', parts = {{field = 1, type = 'unsigned'}}}
41+
42+
The effect is that, for all tuples in space 'tester', field #1 must exist and
43+
must contain an unsigned integer.
44+
The index type is 'hash', so values in field #1 must be unique, because keys
45+
in HASH indexes are unique.
46+
47+
After that, we defined a secondary index (named 'secondary') based on field #2
48+
of each tuple:
49+
50+
.. code-block:: tarantoolsession
51+
52+
tarantool> i = s:create_index('secondary', {type = 'tree', parts = {2, 'string'}})
53+
54+
The effect is that, for all tuples in space 'tester', field #2 must exist and
55+
must contain a string.
56+
The index type is 'tree', so values in field #2 must not be unique, because keys
57+
in TREE indexes may be non-unique.
58+
59+
.. NOTE::
60+
61+
Space definitions and index definitions are stored permanently in Tarantool's
62+
system spaces :ref:`_space <box_space-space>` and :ref:`_index <box_space-index>`
63+
(for details, see reference on :ref:`box.space <box_space>` submodule).
64+
65+
You can add, drop, or alter the definitions at runtime, with some restrictions.
66+
See syntax details in reference on :ref:`box <box-module>` module.
67+
68+
Read more about index operations :ref:`here <index-box_index-operations>`.

0 commit comments

Comments
 (0)