From 814cb0f80a959a0a0eabc42bb87fbdac672e715b Mon Sep 17 00:00:00 2001 From: Patience Daur Date: Fri, 8 Apr 2022 08:10:53 +0300 Subject: [PATCH 1/3] Improve max function description Resolves #1713 --- doc/reference/reference_lua/box_index/max.rst | 25 ++++++++----------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/doc/reference/reference_lua/box_index/max.rst b/doc/reference/reference_lua/box_index/max.rst index e0fd6a5e3d..50cefc7b4e 100644 --- a/doc/reference/reference_lua/box_index/max.rst +++ b/doc/reference/reference_lua/box_index/max.rst @@ -1,34 +1,31 @@ -.. _box_index-max: +.. _box_index-max: -=============================================================================== index_object:max() -=============================================================================== +================== -.. class:: index_object +.. class:: index_object - .. method:: max([key]) + .. method:: max([key]) Find the maximum value in the specified index. :param index_object index_object: an :ref:`object reference - `. + ` :param scalar/table key: values to be matched against the index key - :return: the tuple for the last key in the index. If optional ``key`` value - is supplied, returns the last key which is less than or equal to - ``key`` value. - Starting with Tarantool version 2.0, ``index_object:max``(``key`` - value) returns nothing - if ``key`` value is not equal to a value in the index. + :return: the tuple for the last key in the index. If the optional ``key`` value + is supplied, returns the last key which is less than or equal to ``key``. + Starting with :doc:`Tarantool 2.0.4 `, ``index_object:max(key)`` + returns nothing if ``key`` doesn't match any value in the index. :rtype: tuple **Possible errors:** index is not of type 'TREE'. - **Complexity factors:** Index size, Index type. + **Complexity factors:** index size, index type. **Example:** - .. code-block:: tarantoolsession + .. code-block:: tarantoolsession tarantool> box.space.tester.index.primary:max() --- From becd389cce5dcf9aa348c9e946c5412c9f320cf1 Mon Sep 17 00:00:00 2001 From: Patience Daur Date: Fri, 8 Apr 2022 08:16:18 +0300 Subject: [PATCH 2/3] Edit the min() description accordingly --- doc/reference/reference_lua/box_index/max.rst | 4 ++-- doc/reference/reference_lua/box_index/min.rst | 11 +++++------ 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/doc/reference/reference_lua/box_index/max.rst b/doc/reference/reference_lua/box_index/max.rst index 50cefc7b4e..aa2c353161 100644 --- a/doc/reference/reference_lua/box_index/max.rst +++ b/doc/reference/reference_lua/box_index/max.rst @@ -14,8 +14,8 @@ index_object:max() :param scalar/table key: values to be matched against the index key :return: the tuple for the last key in the index. If the optional ``key`` value - is supplied, returns the last key which is less than or equal to ``key``. - Starting with :doc:`Tarantool 2.0.4 `, ``index_object:max(key)`` + is supplied, returns the last key that is less than or equal to ``key``. + Starting with :doc:`Tarantool 2.0.4 `, ``index_object:max(key)`` returns nothing if ``key`` doesn't match any value in the index. :rtype: tuple diff --git a/doc/reference/reference_lua/box_index/min.rst b/doc/reference/reference_lua/box_index/min.rst index 5735904733..004815baff 100644 --- a/doc/reference/reference_lua/box_index/min.rst +++ b/doc/reference/reference_lua/box_index/min.rst @@ -14,12 +14,11 @@ index_object:min() `. :param scalar/table key: values to be matched against the index key - :return: the tuple for the first key in the index. If optional - ``key`` value is supplied, returns the first key which - is greater than or equal to ``key`` value. - Starting with Tarantool version 2.0, index_object:min(``key`` - value) will return nothing - if ``key`` value is not equal to a value in the index. + :return: the tuple for the first key in the index. If the optional + ``key`` value is supplied, returns the first key that is greater than or equal to ``key``. + Starting with :doc:`Tarantool 2.0.4 `, + ``index_object:min(key)`` returns nothing + if ``key`` doesn't match any value in the index. :rtype: tuple **Possible errors:** index is not of type 'TREE'. From fc1198da2645ba401cd131d5101693155fcb120c Mon Sep 17 00:00:00 2001 From: Patience Daur Date: Fri, 8 Apr 2022 08:42:45 +0300 Subject: [PATCH 3/3] Preserve translations --- doc/reference/reference_lua/box_index/min.rst | 9 ++++---- .../reference/reference_lua/box_index/max.po | 23 +++++++++---------- .../reference/reference_lua/box_index/min.po | 12 +++++----- 3 files changed, 21 insertions(+), 23 deletions(-) diff --git a/doc/reference/reference_lua/box_index/min.rst b/doc/reference/reference_lua/box_index/min.rst index 004815baff..686b042660 100644 --- a/doc/reference/reference_lua/box_index/min.rst +++ b/doc/reference/reference_lua/box_index/min.rst @@ -1,12 +1,11 @@ .. _box_index-min: -=============================================================================== index_object:min() -=============================================================================== +================== -.. class:: index_object +.. class:: index_object - .. method:: min([key]) + .. method:: min([key]) Find the minimum value in the specified index. @@ -27,7 +26,7 @@ index_object:min() **Example:** - .. code-block:: tarantoolsession + .. code-block:: tarantoolsession tarantool> box.space.tester.index.primary:min() --- diff --git a/locale/ru/LC_MESSAGES/reference/reference_lua/box_index/max.po b/locale/ru/LC_MESSAGES/reference/reference_lua/box_index/max.po index 84dfa08169..63aebf47eb 100644 --- a/locale/ru/LC_MESSAGES/reference/reference_lua/box_index/max.po +++ b/locale/ru/LC_MESSAGES/reference/reference_lua/box_index/max.po @@ -8,8 +8,8 @@ msgstr "Поиск максимального значения в указанн msgid "Parameters" msgstr "Параметры" -msgid "an :ref:`object reference `." -msgstr ":ref:`ссылка на объект `." +msgid "an :ref:`object reference `" +msgstr ":ref:`ссылка на объект `" msgid "values to be matched against the index key" msgstr "значения для сопоставления с ключом индекса" @@ -18,16 +18,15 @@ msgid "return" msgstr "возвращает" msgid "" -"the tuple for the last key in the index. If optional ``key`` value is " -"supplied, returns the last key which is less than or equal to ``key`` value." -" Starting with Tarantool version 2.0, ``index_object:max``(``key`` value) " -"returns nothing if ``key`` value is not equal to a value in the index." +"the tuple for the last key in the index. If the optional ``key`` value is " +"supplied, returns the last key that is less than or equal to ``key``." +" Starting with :doc:`Tarantool 2.0.4 `, ``index_object:max(key)``" +" returns nothing if ``key`` doesn't match any value in the index." msgstr "" "кортеж для последнего ключа в индексе. Если указано необязательное значение " "ключа ``key``, будет выведен последний ключ, который меньше или равен " -"значению ключа ``key``. Начиная с версии Tarantool'а 2.0, index:max(значение" -" ``key``) не вернет ничего, если значение ``key`` не равно значению в " -"индексе." +"значению ключа ``key``. Начиная с версии :doc:`Tarantool 2.0.4 `," +" ``index:max(key)`` не возвращает ничего, если индекс не содержит значения ``key``." msgid "rtype" msgstr "тип возвращаемого значения" @@ -36,10 +35,10 @@ msgid "tuple" msgstr "tuple" msgid "**Possible errors:** index is not of type 'TREE'." -msgstr "**Возможные ошибки:** тип индекса не 'TREE'" +msgstr "**Возможные ошибки:** тип индекса не 'TREE'." -msgid "**Complexity factors:** Index size, Index type." -msgstr "**Факторы сложности:** Размер индекса, тип индекса" +msgid "**Complexity factors:** index size, index type." +msgstr "**Факторы сложности:** размер индекса, тип индекса." msgid "**Example:**" msgstr "**Пример:**" diff --git a/locale/ru/LC_MESSAGES/reference/reference_lua/box_index/min.po b/locale/ru/LC_MESSAGES/reference/reference_lua/box_index/min.po index 2ab760f250..ba6b942192 100644 --- a/locale/ru/LC_MESSAGES/reference/reference_lua/box_index/min.po +++ b/locale/ru/LC_MESSAGES/reference/reference_lua/box_index/min.po @@ -18,15 +18,15 @@ msgid "return" msgstr "возвращает" msgid "" -"the tuple for the first key in the index. If optional ``key`` value is " -"supplied, returns the first key which is greater than or equal to ``key`` " -"value. Starting with Tarantool version 2.0, index_object:min(``key`` value) " -"will return nothing if ``key`` value is not equal to a value in the index." +"the tuple for the first key in the index. If the optional ``key`` value is " +"supplied, returns the first key that is greater than or equal to ``key``. " +"Starting with :doc:`Tarantool 2.0.4 `, ``index_object:min(key)`` " +"returns nothing if ``key`` doesn't match any value in the index." msgstr "" "кортеж для первого ключа в индексе. Если указано необязательное значение " "ключа ``key``, будет выведен первый ключ, который больше или равен значению " -"ключа ``key``. Начиная с версии Tarantool'а 2.0, index:min(значение ``key``)" -" не вернет ничего, если значение ``key`` не равно значению в индексе." +"ключа ``key``. Начиная с версии :doc:`Tarantool 2.0.4 `, ``index:min(key)``" +" не вернет ничего, если индекс не содержит значения ``key``." msgid "rtype" msgstr "тип возвращаемого значения"