Skip to content

Commit 2c0c595

Browse files
authored
Improve box.index:min/max function description (#2798)
Resolves #1713 * Improve max function description * Edit the min() description accordingly * Preserve translations
1 parent 6d5535b commit 2c0c595

File tree

4 files changed

+37
-43
lines changed

4 files changed

+37
-43
lines changed

doc/reference/reference_lua/box_index/max.rst

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,31 @@
1-
.. _box_index-max:
1+
.. _box_index-max:
22

3-
===============================================================================
43
index_object:max()
5-
===============================================================================
4+
==================
65

7-
.. class:: index_object
6+
.. class:: index_object
87

9-
.. method:: max([key])
8+
.. method:: max([key])
109

1110
Find the maximum value in the specified index.
1211

1312
:param index_object index_object: an :ref:`object reference
14-
<app_server-object_reference>`.
13+
<app_server-object_reference>`
1514
:param scalar/table key: values to be matched against the index key
1615

17-
:return: the tuple for the last key in the index. If optional ``key`` value
18-
is supplied, returns the last key which is less than or equal to
19-
``key`` value.
20-
Starting with Tarantool version 2.0, ``index_object:max``(``key``
21-
value) returns nothing
22-
if ``key`` value is not equal to a value in the index.
16+
:return: the tuple for the last key in the index. If the optional ``key`` value
17+
is supplied, returns the last key that is less than or equal to ``key``.
18+
Starting with :doc:`Tarantool 2.0.4 </release/2.1.2>`, ``index_object:max(key)``
19+
returns nothing if ``key`` doesn't match any value in the index.
2320
:rtype: tuple
2421

2522
**Possible errors:** index is not of type 'TREE'.
2623

27-
**Complexity factors:** Index size, Index type.
24+
**Complexity factors:** index size, index type.
2825

2926
**Example:**
3027

31-
.. code-block:: tarantoolsession
28+
.. code-block:: tarantoolsession
3229
3330
tarantool> box.space.tester.index.primary:max()
3431
---

doc/reference/reference_lua/box_index/min.rst

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,23 @@
11
.. _box_index-min:
22

3-
===============================================================================
43
index_object:min()
5-
===============================================================================
4+
==================
65

7-
.. class:: index_object
6+
.. class:: index_object
87

9-
.. method:: min([key])
8+
.. method:: min([key])
109

1110
Find the minimum value in the specified index.
1211

1312
:param index_object index_object: an :ref:`object reference
1413
<app_server-object_reference>`.
1514
:param scalar/table key: values to be matched against the index key
1615

17-
:return: the tuple for the first key in the index. If optional
18-
``key`` value is supplied, returns the first key which
19-
is greater than or equal to ``key`` value.
20-
Starting with Tarantool version 2.0, index_object:min(``key``
21-
value) will return nothing
22-
if ``key`` value is not equal to a value in the index.
16+
:return: the tuple for the first key in the index. If the optional
17+
``key`` value is supplied, returns the first key that is greater than or equal to ``key``.
18+
Starting with :doc:`Tarantool 2.0.4 </release/2.1.2>`,
19+
``index_object:min(key)`` returns nothing
20+
if ``key`` doesn't match any value in the index.
2321
:rtype: tuple
2422

2523
**Possible errors:** index is not of type 'TREE'.
@@ -28,7 +26,7 @@ index_object:min()
2826

2927
**Example:**
3028

31-
.. code-block:: tarantoolsession
29+
.. code-block:: tarantoolsession
3230
3331
tarantool> box.space.tester.index.primary:min()
3432
---

locale/ru/LC_MESSAGES/reference/reference_lua/box_index/max.po

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ msgstr "Поиск максимального значения в указанн
88
msgid "Parameters"
99
msgstr "Параметры"
1010

11-
msgid "an :ref:`object reference <app_server-object_reference>`."
12-
msgstr ":ref:`ссылка на объект <app_server-object_reference>`."
11+
msgid "an :ref:`object reference <app_server-object_reference>`"
12+
msgstr ":ref:`ссылка на объект <app_server-object_reference>`"
1313

1414
msgid "values to be matched against the index key"
1515
msgstr "значения для сопоставления с ключом индекса"
@@ -18,16 +18,15 @@ msgid "return"
1818
msgstr "возвращает"
1919

2020
msgid ""
21-
"the tuple for the last key in the index. If optional ``key`` value is "
22-
"supplied, returns the last key which is less than or equal to ``key`` value."
23-
" Starting with Tarantool version 2.0, ``index_object:max``(``key`` value) "
24-
"returns nothing if ``key`` value is not equal to a value in the index."
21+
"the tuple for the last key in the index. If the optional ``key`` value is "
22+
"supplied, returns the last key that is less than or equal to ``key``."
23+
" Starting with :doc:`Tarantool 2.0.4 </release/2.1.2>`, ``index_object:max(key)``"
24+
" returns nothing if ``key`` doesn't match any value in the index."
2525
msgstr ""
2626
"кортеж для последнего ключа в индексе. Если указано необязательное значение "
2727
"ключа ``key``, будет выведен последний ключ, который меньше или равен "
28-
"значению ключа ``key``. Начиная с версии Tarantool'а 2.0, index:max(значение"
29-
" ``key``) не вернет ничего, если значение ``key`` не равно значению в "
30-
"индексе."
28+
"значению ключа ``key``. Начиная с версии :doc:`Tarantool 2.0.4 </release/2.1.2>`,"
29+
" ``index:max(key)`` не возвращает ничего, если индекс не содержит значения ``key``."
3130

3231
msgid "rtype"
3332
msgstr "тип возвращаемого значения"
@@ -36,10 +35,10 @@ msgid "tuple"
3635
msgstr "tuple"
3736

3837
msgid "**Possible errors:** index is not of type 'TREE'."
39-
msgstr "**Возможные ошибки:** тип индекса не 'TREE'"
38+
msgstr "**Возможные ошибки:** тип индекса не 'TREE'."
4039

41-
msgid "**Complexity factors:** Index size, Index type."
42-
msgstr "**Факторы сложности:** Размер индекса, тип индекса"
40+
msgid "**Complexity factors:** index size, index type."
41+
msgstr "**Факторы сложности:** размер индекса, тип индекса."
4342

4443
msgid "**Example:**"
4544
msgstr "**Пример:**"

locale/ru/LC_MESSAGES/reference/reference_lua/box_index/min.po

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ msgid "return"
1818
msgstr "возвращает"
1919

2020
msgid ""
21-
"the tuple for the first key in the index. If optional ``key`` value is "
22-
"supplied, returns the first key which is greater than or equal to ``key`` "
23-
"value. Starting with Tarantool version 2.0, index_object:min(``key`` value) "
24-
"will return nothing if ``key`` value is not equal to a value in the index."
21+
"the tuple for the first key in the index. If the optional ``key`` value is "
22+
"supplied, returns the first key that is greater than or equal to ``key``. "
23+
"Starting with :doc:`Tarantool 2.0.4 </release/2.1.2>`, ``index_object:min(key)`` "
24+
"returns nothing if ``key`` doesn't match any value in the index."
2525
msgstr ""
2626
"кортеж для первого ключа в индексе. Если указано необязательное значение "
2727
"ключа ``key``, будет выведен первый ключ, который больше или равен значению "
28-
"ключа ``key``. Начиная с версии Tarantool 2.0, index:min(значение ``key``)"
29-
" не вернет ничего, если значение ``key`` не равно значению в индексе."
28+
"ключа ``key``. Начиная с версии :doc:`Tarantool 2.0.4 </release/2.1.2>`, ``index:min(key)``"
29+
" не вернет ничего, если индекс не содержит значения ``key``."
3030

3131
msgid "rtype"
3232
msgstr "тип возвращаемого значения"

0 commit comments

Comments
 (0)