diff --git a/doc/reference/reference_lua/index.rst b/doc/reference/reference_lua/index.rst index 7ddae788b0..d274921b92 100644 --- a/doc/reference/reference_lua/index.rst +++ b/doc/reference/reference_lua/index.rst @@ -60,6 +60,7 @@ This reference covers Tarantool's built-in Lua modules. tarantool uri utf8 + ulid uuid varbinary xlog diff --git a/doc/reference/reference_lua/ulid.rst b/doc/reference/reference_lua/ulid.rst new file mode 100644 index 0000000000..6cf8b7c234 --- /dev/null +++ b/doc/reference/reference_lua/ulid.rst @@ -0,0 +1,523 @@ +.. _ulid-module: + +Module ulid +=========== + +Since version 3.6.0. + +.. _ulid-module-overview: + +Overview +-------- + +The ``ulid`` module implements ULID (Universally Unique Lexicographically +Sortable Identifier) support in Tarantool. A ULID is a 128-bit identifier +consisting of: + +* a 48-bit timestamp in milliseconds since the Unix epoch +* an 80-bit random (entropy) component + +ULID strings are encoded using **Crockford Base32**, a compact and +human-friendly alphabet that excludes visually ambiguous characters. + +In binary form, ULIDs are represented as 16-byte values in **big-endian** +byte order. This ensures that the lexicographical order of binary ULIDs +matches their chronological order, in accordance with the ULID specification. + +ULIDs have several useful properties: + +* They are lexicographically sortable by creation time. +* They fit entirely into 26 ASCII characters. +* They avoid visually ambiguous symbols (``I``, ``L``, ``O``, ``U``). +* They have 128 bits of total uniqueness-same as UUID v4. + +Tarantool uses a *monotonic* ULID generator. This ensures that multiple ULIDs +created within the same millisecond are strictly increasing and preserve +sort order: for any two ULIDs generated in the same millisecond, the one +created later is greater than the earlier one. + +Internally, the monotonic generator keeps the last generated ULID for the +current millisecond and increments the 80-bit random part for each subsequent +ULID. A real overflow of the random part can happen only after generating +``2^80`` ULIDs within the same millisecond, which is practically impossible +on real hardware. However, for strict correctness of the ULID specification +and to avoid silent wrap-around, the implementation detects this overflow +and fails the next generation attempt with a Lua error +(``ULID random component overflow``). + +To use this module, run the following command: + +.. code-block:: lua + + ulid = require('ulid') + +.. _ulid-module-comparison: + +Comparison +---------- + +ULID objects support the full set of Lua comparison operators: + +* ``==`` and ``~=`` - equality and inequality. +* ``<`` and ``<=`` - lexicographical comparison. +* ``>`` and ``>=`` - lexicographical comparison. + +The comparison is based on the internal 16-byte representation in +big-endian order and is consistent with the ULID specification: +for ULIDs created by the monotonic generator, later ULIDs are greater +than earlier ones, including ULIDs generated within the same millisecond. + +Comparison works both between ULID objects and between a ULID object +and a ULID string: + +* ``u1 == u2`` compares two ULID objects directly. +* ``u1 == "01..."`` converts the string to ULID and compares values. +* ``u1 < "01..."`` or ``"01..." < u1`` convert the string argument to ULID + and perform lexicographical comparison. + +Examples: + +.. code-block:: tarantoolsession + + tarantool> u1 = ulid.new() + tarantool> u2 = ulid.new() + tarantool> u1 < u2, u1 <= u2, u1 == u2, u1 ~= u2, u1 > u2, u1 >= u2 + --- + - true + - true + - false + - true + - false + - false + ... + + tarantool> u = ulid.new() + tarantool> s = u:str() + tarantool> u == s, u < s, u > s + --- + - true + - false + - false + ... + + tarantool> u == "not-a-valid-ulid" + --- + - false + ... + + tarantool> u < "not-a-valid-ulid" + --- + - error: '[string "return u < "not-a-valid-ulid""]:1: incorrect value to convert to + ulid as 2 argument' + ... + +.. _ulid-module-api-reference: + +API Reference +------------- + +Below is list of all ``ulid`` functions and members. + +.. module:: ulid + +.. container:: table + + .. rst-class:: left-align-column-1 + .. rst-class:: left-align-column-2 + + .. list-table:: + :widths: 30 70 + :header-rows: 1 + + * - Name + - Use + + * - :ref:`ulid.NULL ` + - A nil ULID object + + * - :ref:`ulid.ulid() ` |br| + :ref:`ulid.bin() ` |br| + :ref:`ulid.str() ` + - Shortcuts to create a new ULID value + + * - :ref:`ulid.new() ` + - Create a new ULID object + + * - :ref:`ulid.fromstr() ` |br| + :ref:`ulid.frombin() ` |br| + :ref:`ulid_object:bin() ` |br| + :ref:`ulid_object:str() ` + - Convert between string, binary, and ULID object forms + + * - :ref:`ulid.is_ulid() ` |br| + :ref:`ulid_object:isnil() ` + - Check ULID type or nil value + +.. _ulid-null: + +.. data:: NULL + + A nil ULID object - a ULID that contains 16 zero bytes. + + :return: the nil ULID value + :rtype: cdata + + Example: + + .. code-block:: tarantoolsession + + tarantool> ulid.NULL + --- + - 00000000000000000000000000 + ... + +.. _ulid-new: + +.. function:: new() + + Create a new ULID object. + + This function uses the monotonic generator described in the + :ref:`overview `. Multiple ULIDs created within the + same millisecond are strictly increasing. + + :return: a new ULID object + :rtype: cdata + + Example: + + .. code-block:: tarantoolsession + + tarantool> ulid.new() + --- + - 06DGE3YNDCM2PPWJT3SKTTRNZR + ... + +.. _ulid-call: + +.. function:: ulid() + + Calling the module directly is the same as calling :func:`ulid.new()`. + + In other words, ``ulid()`` is a shortcut for ``ulid.new()``. + + :return: a new ULID object (same as :func:`ulid.new`) + :rtype: cdata + + Example: + + .. code-block:: tarantoolsession + + tarantool> ulid() + --- + - 06DGE41G63GAZ6F0TV4WRSVCCW + ... + +.. _ulid-str: + +.. function:: str() + + Create a new ULID and return its **string** representation. + + This is a shortcut for ``ulid.new():str()``. + + The result is always 26 characters, encoded using Crockford Base32. + + :return: a ULID string + :rtype: 26-byte string + + Example: + + .. code-block:: tarantoolsession + + tarantool> ulid.str() + --- + - 06DGE480BWZ6H5BKX0KS3Q8S2G + ... + +.. _ulid-bin: + +.. function:: bin() + + Create a new ULID and return its **binary** representation + as a 16-byte string. + + This is a shortcut for ``ulid.new():bin()``. + + :return: a ULID in binary form + :rtype: 16-byte string + + Example: + + .. code-block:: tarantoolsession + + tarantool> #ulid.bin() + --- + - 16 + ... + +.. _ulid-fromstr: + +.. function:: fromstr(ulid_string) + + Create a ULID object from a 26-character string. + + The input must be a valid ULID string encoded using Crockford Base32. + If the string is invalid (wrong length or invalid symbols), ``nil`` + is returned. + + :param string ulid_string: ULID in 26-character string form + :return: converted ULID or ``nil`` + :rtype: cdata or ``nil`` + + Example: + + .. code-block:: tarantoolsession + + tarantool> u = ulid.fromstr('06DGE4FH80PHA28YZVV5Z473T4') + tarantool> u + --- + - 06DGE4FH80PHA28YZVV5Z473T4 + ... + +.. _ulid-frombin: + +.. function:: frombin(ulid_bin) + + Create a ULID object from a 16-byte binary string. + + :param string ulid_bin: ULID in 16-byte binary string form + :return: converted ULID + :rtype: cdata + + Example: + + .. code-block:: tarantoolsession + + tarantool> u1 = ulid.new() + tarantool> b = u1:bin() + tarantool> u2 = ulid.frombin(b) + tarantool> u1 == u2 + --- + - true + ... + +.. _ulid-is_ulid: + +.. function:: is_ulid(value) + + Check if the given value is a ULID cdata object. + + :param value: a value of any type + :return: ``true`` if the value is a ULID, otherwise ``false`` + :rtype: boolean + + Example: + + .. code-block:: tarantoolsession + + tarantool> ulid.is_ulid(ulid.new()) + --- + - true + ... + + tarantool> ulid.is_ulid("string") + --- + - false + ... + +ULID object +----------- + +A ULID object returned by :func:`ulid.new`, :func:`ulid.fromstr`, +or :func:`ulid.frombin` provides the following methods: + +.. _ulid-object_bin: + +.. method:: ulid_object:bin() + + Return the ULID as a 16-byte binary string. + + :return: ULID in binary form + :rtype: 16-byte string + + Example: + + .. code-block:: tarantoolsession + + tarantool> u = ulid.new() + tarantool> b = u:bin() + tarantool> #b, b + --- + - 16 + - "\x01\x9B\a\xAD==\x81u۶-\x93hPa\xAE" + ... + +.. _ulid-object_str: + +.. method:: ulid_object:str() + + Return the ULID as a 26-character string. + + :return: ULID in string form + :rtype: 26-byte string + + ULID objects also implement the standard Lua ``__tostring`` metamethod. + This means that calling ``tostring(u)`` for a ULID object ``u`` returns + the same value as ``u:str()``, and ULID objects are automatically + converted to their 26-character string representation when needed + in string context. + + Example: + + .. code-block:: tarantoolsession + + tarantool> u = ulid.new() + tarantool> u:str(), tostring(u) + --- + - 06DGFBE3J07B7DB5A3JP4WQ9CM + - 06DGFBE3J07B7DB5A3JP4WQ9CM + ... + +.. _ulid-isnil: + +.. method:: ulid_object:isnil() + + Check if the ULID is the nil ULID (all 16 bytes are zero). + + :return: ``true`` for :data:`ulid.NULL`, otherwise ``false`` + :rtype: boolean + + Example: + + .. code-block:: tarantoolsession + + tarantool> ulid.NULL:isnil() + --- + - true + ... + + tarantool> ulid.new():isnil() + --- + - false + ... + +Examples +-------- + +Basic usage: + +.. code-block:: tarantoolsession + + tarantool> u_obj = ulid.new() + tarantool> u_str = ulid.str() + tarantool> u_bin = ulid.bin() + + tarantool> u_obj, u_str, u_bin + --- + - 06DGE6SEZDCFFSFEAJFMC9YQAR + - 06DGE6T0DW0N2N6KMPVZ8SGE4W + - "\x01\x9B\a\eSz8\xBA\xB3\xC5\xCC\xFE\x18\xBB1\xD6" + ... + +Creating a ULID object and inspecting it: + +.. code-block:: tarantoolsession + + tarantool> u = ulid() + --- + ... + + tarantool> #u:bin(), #u:str(), type(u), u:isnil() + --- + - 16 + - 26 + - cdata + - false + ... + + tarantool> tostring(u) == u:str() + --- + - true + ... + +Converting between string and binary formats: + +.. code-block:: tarantoolsession + + tarantool> s = ulid.str() + tarantool> s + --- + - 06DGE70CPFDV344XX43687N1SM + ... + + tarantool> u = ulid.fromstr(s) + tarantool> u:str() == s + --- + - true + ... + + tarantool> b = u:bin() + tarantool> u2 = ulid.frombin(b) + tarantool> u2 == u + --- + - true + ... + +Working with ``ulid.NULL``: + +.. code-block:: tarantoolsession + + tarantool> ulid.NULL + --- + - 00000000000000000000000000 + ... + + tarantool> ulid.NULL:isnil() + --- + - true + ... + + tarantool> ulid.new():isnil() + --- + - false + ... + +Comparison operators: + +.. code-block:: tarantoolsession + + tarantool> u1 = ulid.new() + tarantool> u2 = ulid.new() + tarantool> u1 < u2 + --- + - true + ... + +Checking types: + +.. code-block:: tarantoolsession + + tarantool> u = ulid.new() + tarantool> ulid.is_ulid(u) + --- + - true + ... + + tarantool> ulid.is_ulid("06DGE7RJK8QWJE27X5VVCC5VDW") + --- + - false + ... + +Generating many ULIDs: + +.. code-block:: tarantoolsession + + tarantool> for i = 1,5 do print(ulid.str()) end + --- + 06DGE7T8AJD6EDNJ3VQ2ZYB3R4 + 06DGE7T8AJD6EDNJ3VQ2ZYB3R8 + 06DGE7T8AJD6EDNJ3VQ2ZYB3RC + 06DGE7T8AJD6EDNJ3VQ2ZYB3RG + 06DGE7T8AJD6EDNJ3VQ2ZYB3RM + ... diff --git a/locale/en/reference/reference_lua/ulid.pot b/locale/en/reference/reference_lua/ulid.pot new file mode 100644 index 0000000000..c129f5570e --- /dev/null +++ b/locale/en/reference/reference_lua/ulid.pot @@ -0,0 +1,672 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) +# This file is distributed under the same license as the Tarantool package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Tarantool 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-12-19 13:32+0500\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../doc/reference/reference_lua/ulid.rst:4 +msgid "Module ulid" +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:6 +msgid "Since version 3.6.0." +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:11 +msgid "Overview" +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:13 +msgid "The ``ulid`` module implements ULID (Universally Unique Lexicographically Sortable Identifier) support in Tarantool. A ULID is a 128-bit identifier consisting of:" +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:17 +msgid "a 48-bit timestamp in milliseconds since the Unix epoch" +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:18 +msgid "an 80-bit random (entropy) component" +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:20 +msgid "ULID strings are encoded using **Crockford Base32**, a compact and human-friendly alphabet that excludes visually ambiguous characters." +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:23 +msgid "In binary form, ULIDs are represented as 16-byte values in **big-endian** byte order. This ensures that the lexicographical order of binary ULIDs matches their chronological order, in accordance with the ULID specification." +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:27 +msgid "ULIDs have several useful properties:" +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:29 +msgid "They are lexicographically sortable by creation time." +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:30 +msgid "They fit entirely into 26 ASCII characters." +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:31 +msgid "They avoid visually ambiguous symbols (``I``, ``L``, ``O``, ``U``)." +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:32 +msgid "They have 128 bits of total uniqueness-same as UUID v4." +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:34 +msgid "Tarantool uses a *monotonic* ULID generator. This ensures that multiple ULIDs created within the same millisecond are strictly increasing and preserve sort order: for any two ULIDs generated in the same millisecond, the one created later is greater than the earlier one." +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:39 +msgid "Internally, the monotonic generator keeps the last generated ULID for the current millisecond and increments the 80-bit random part for each subsequent ULID. A real overflow of the random part can happen only after generating ``2^80`` ULIDs within the same millisecond, which is practically impossible on real hardware. However, for strict correctness of the ULID specification and to avoid silent wrap-around, the implementation detects this overflow and fails the next generation attempt with a Lua error (``ULID random component overflow``)." +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:48 +msgid "To use this module, run the following command:" +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:50 +msgid "ulid = require('ulid')" +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:57 +msgid "Comparison" +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:59 +msgid "ULID objects support the full set of Lua comparison operators:" +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:61 +msgid "``==`` and ``~=`` - equality and inequality." +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:62 +msgid "``<`` and ``<=`` - lexicographical comparison." +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:63 +msgid "``>`` and ``>=`` - lexicographical comparison." +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:65 +msgid "The comparison is based on the internal 16-byte representation in big-endian order and is consistent with the ULID specification: for ULIDs created by the monotonic generator, later ULIDs are greater than earlier ones, including ULIDs generated within the same millisecond." +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:70 +msgid "Comparison works both between ULID objects and between a ULID object and a ULID string:" +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:73 +msgid "``u1 == u2`` compares two ULID objects directly." +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:74 +msgid "``u1 == \"01...\"`` converts the string to ULID and compares values." +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:75 +msgid "``u1 < \"01...\"`` or ``\"01...\" < u1`` convert the string argument to ULID and perform lexicographical comparison." +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:78 +msgid "Examples:" +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:80 +msgid "tarantool> u1 = ulid.new()\n" +"tarantool> u2 = ulid.new()\n" +"tarantool> u1 < u2, u1 <= u2, u1 == u2, u1 ~= u2, u1 > u2, u1 >= u2\n" +"---\n" +"- true\n" +"- true\n" +"- false\n" +"- true\n" +"- false\n" +"- false\n" +"...\n" +"\n" +"tarantool> u = ulid.new()\n" +"tarantool> s = u:str()\n" +"tarantool> u == s, u < s, u > s\n" +"---\n" +"- true\n" +"- false\n" +"- false\n" +"...\n" +"\n" +"tarantool> u == \"not-a-valid-ulid\"\n" +"---\n" +"- false\n" +"...\n" +"\n" +"tarantool> u < \"not-a-valid-ulid\"\n" +"---\n" +"- error: '[string \"return u < \"not-a-valid-ulid\"\"]:1: incorrect value to convert to\n" +" ulid as 2 argument'\n" +"..." +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:117 +msgid "API Reference" +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:119 +msgid "Below is list of all ``ulid`` functions and members." +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:132 +msgid "Name" +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:133 +msgid "Use" +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:135 +msgid ":ref:`ulid.NULL `" +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:136 +msgid "A nil ULID object" +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:138 +msgid ":ref:`ulid.ulid() ` |br| :ref:`ulid.bin() ` |br| :ref:`ulid.str() `" +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:141 +msgid "Shortcuts to create a new ULID value" +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:143 +msgid ":ref:`ulid.new() `" +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:144 +msgid "Create a new ULID object" +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:146 +msgid ":ref:`ulid.fromstr() ` |br| :ref:`ulid.frombin() ` |br| :ref:`ulid_object:bin() ` |br| :ref:`ulid_object:str() `" +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:150 +msgid "Convert between string, binary, and ULID object forms" +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:152 +msgid ":ref:`ulid.is_ulid() ` |br| :ref:`ulid_object:isnil() `" +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:154 +msgid "Check ULID type or nil value" +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:160 +msgid "A nil ULID object - a ULID that contains 16 zero bytes." +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:0 +#: ../../doc/reference/reference_lua/ulid.rst:0 +#: ../../doc/reference/reference_lua/ulid.rst:0 +#: ../../doc/reference/reference_lua/ulid.rst:0 +#: ../../doc/reference/reference_lua/ulid.rst:0 +#: ../../doc/reference/reference_lua/ulid.rst:0 +#: ../../doc/reference/reference_lua/ulid.rst:0 +#: ../../doc/reference/reference_lua/ulid.rst:0 +#: ../../doc/reference/reference_lua/ulid.rst:0 +#: ../../doc/reference/reference_lua/ulid.rst:0 +#: ../../doc/reference/reference_lua/ulid.rst:0 +msgid "return" +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:162 +msgid "the nil ULID value" +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:0 +#: ../../doc/reference/reference_lua/ulid.rst:0 +#: ../../doc/reference/reference_lua/ulid.rst:0 +#: ../../doc/reference/reference_lua/ulid.rst:0 +#: ../../doc/reference/reference_lua/ulid.rst:0 +#: ../../doc/reference/reference_lua/ulid.rst:0 +#: ../../doc/reference/reference_lua/ulid.rst:0 +#: ../../doc/reference/reference_lua/ulid.rst:0 +#: ../../doc/reference/reference_lua/ulid.rst:0 +#: ../../doc/reference/reference_lua/ulid.rst:0 +#: ../../doc/reference/reference_lua/ulid.rst:0 +msgid "rtype" +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:163 +#: ../../doc/reference/reference_lua/ulid.rst:185 +#: ../../doc/reference/reference_lua/ulid.rst:205 +#: ../../doc/reference/reference_lua/ulid.rst:291 +msgid "cdata" +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:165 +#: ../../doc/reference/reference_lua/ulid.rst:187 +#: ../../doc/reference/reference_lua/ulid.rst:207 +#: ../../doc/reference/reference_lua/ulid.rst:229 +#: ../../doc/reference/reference_lua/ulid.rst:250 +#: ../../doc/reference/reference_lua/ulid.rst:273 +#: ../../doc/reference/reference_lua/ulid.rst:293 +#: ../../doc/reference/reference_lua/ulid.rst:315 +#: ../../doc/reference/reference_lua/ulid.rst:344 +#: ../../doc/reference/reference_lua/ulid.rst:371 +#: ../../doc/reference/reference_lua/ulid.rst:391 +msgid "Example:" +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:167 +msgid "tarantool> ulid.NULL\n" +"---\n" +"- 00000000000000000000000000\n" +"..." +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:178 +msgid "Create a new ULID object." +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:180 +msgid "This function uses the monotonic generator described in the :ref:`overview `. Multiple ULIDs created within the same millisecond are strictly increasing." +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:184 +msgid "a new ULID object" +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:189 +msgid "tarantool> ulid.new()\n" +"---\n" +"- 06DGE3YNDCM2PPWJT3SKTTRNZR\n" +"..." +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:200 +msgid "Calling the module directly is the same as calling :func:`ulid.new()`." +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:202 +msgid "In other words, ``ulid()`` is a shortcut for ``ulid.new()``." +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:204 +msgid "a new ULID object (same as :func:`ulid.new`)" +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:209 +msgid "tarantool> ulid()\n" +"---\n" +"- 06DGE41G63GAZ6F0TV4WRSVCCW\n" +"..." +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:220 +msgid "Create a new ULID and return its **string** representation." +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:222 +msgid "This is a shortcut for ``ulid.new():str()``." +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:224 +msgid "The result is always 26 characters, encoded using Crockford Base32." +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:226 +msgid "a ULID string" +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:227 +#: ../../doc/reference/reference_lua/ulid.rst:363 +msgid "26-byte string" +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:231 +msgid "tarantool> ulid.str()\n" +"---\n" +"- 06DGE480BWZ6H5BKX0KS3Q8S2G\n" +"..." +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:242 +msgid "Create a new ULID and return its **binary** representation as a 16-byte string." +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:245 +msgid "This is a shortcut for ``ulid.new():bin()``." +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:247 +msgid "a ULID in binary form" +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:248 +#: ../../doc/reference/reference_lua/ulid.rst:342 +msgid "16-byte string" +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:252 +msgid "tarantool> #ulid.bin()\n" +"---\n" +"- 16\n" +"..." +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:263 +msgid "Create a ULID object from a 26-character string." +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:265 +msgid "The input must be a valid ULID string encoded using Crockford Base32. If the string is invalid (wrong length or invalid symbols), ``nil`` is returned." +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:0 +#: ../../doc/reference/reference_lua/ulid.rst:0 +#: ../../doc/reference/reference_lua/ulid.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:0 +#: ../../doc/reference/reference_lua/ulid.rst:0 +#: ../../doc/reference/reference_lua/ulid.rst:0 +msgid "Return" +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:0 +#: ../../doc/reference/reference_lua/ulid.rst:0 +#: ../../doc/reference/reference_lua/ulid.rst:0 +msgid "Return type" +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:269 +msgid "ULID in 26-character string form" +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:270 +msgid "converted ULID or ``nil``" +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:271 +msgid "cdata or ``nil``" +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:275 +msgid "tarantool> u = ulid.fromstr('06DGE4FH80PHA28YZVV5Z473T4')\n" +"tarantool> u\n" +"---\n" +"- 06DGE4FH80PHA28YZVV5Z473T4\n" +"..." +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:287 +msgid "Create a ULID object from a 16-byte binary string." +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:289 +msgid "ULID in 16-byte binary string form" +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:290 +msgid "converted ULID" +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:295 +msgid "tarantool> u1 = ulid.new()\n" +"tarantool> b = u1:bin()\n" +"tarantool> u2 = ulid.frombin(b)\n" +"tarantool> u1 == u2\n" +"---\n" +"- true\n" +"..." +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:309 +msgid "Check if the given value is a ULID cdata object." +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:311 +msgid "a value of any type" +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:312 +msgid "``true`` if the value is a ULID, otherwise ``false``" +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:313 +#: ../../doc/reference/reference_lua/ulid.rst:389 +msgid "boolean" +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:317 +msgid "tarantool> ulid.is_ulid(ulid.new())\n" +"---\n" +"- true\n" +"...\n" +"\n" +"tarantool> ulid.is_ulid(\"string\")\n" +"---\n" +"- false\n" +"..." +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:330 +msgid "ULID object" +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:332 +msgid "A ULID object returned by :func:`ulid.new`, :func:`ulid.fromstr`, or :func:`ulid.frombin` provides the following methods:" +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:339 +msgid "Return the ULID as a 16-byte binary string." +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:341 +msgid "ULID in binary form" +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:346 +msgid "tarantool> u = ulid.new()\n" +"tarantool> b = u:bin()\n" +"tarantool> #b, b\n" +"---\n" +"- 16\n" +"- \"\\x01\\x9B\\a\\xAD==\\x81u۶-\\x93hPa\\xAE\"\n" +"..." +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:360 +msgid "Return the ULID as a 26-character string." +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:362 +msgid "ULID in string form" +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:365 +msgid "ULID objects also implement the standard Lua ``__tostring`` metamethod. This means that calling ``tostring(u)`` for a ULID object ``u`` returns the same value as ``u:str()``, and ULID objects are automatically converted to their 26-character string representation when needed in string context." +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:373 +msgid "tarantool> u = ulid.new()\n" +"tarantool> u:str(), tostring(u)\n" +"---\n" +"- 06DGFBE3J07B7DB5A3JP4WQ9CM\n" +"- 06DGFBE3J07B7DB5A3JP4WQ9CM\n" +"..." +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:386 +msgid "Check if the ULID is the nil ULID (all 16 bytes are zero)." +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:388 +msgid "``true`` for :data:`ulid.NULL`, otherwise ``false``" +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:393 +msgid "tarantool> ulid.NULL:isnil()\n" +"---\n" +"- true\n" +"...\n" +"\n" +"tarantool> ulid.new():isnil()\n" +"---\n" +"- false\n" +"..." +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:406 +msgid "Examples" +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:408 +msgid "Basic usage:" +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:410 +msgid "tarantool> u_obj = ulid.new()\n" +"tarantool> u_str = ulid.str()\n" +"tarantool> u_bin = ulid.bin()\n" +"\n" +"tarantool> u_obj, u_str, u_bin\n" +"---\n" +"- 06DGE6SEZDCFFSFEAJFMC9YQAR\n" +"- 06DGE6T0DW0N2N6KMPVZ8SGE4W\n" +"- \"\\x01\\x9B\\a\\eSz8\\xBA\\xB3\\xC5\\xCC\\xFE\\x18\\xBB1\\xD6\"\n" +"..." +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:423 +msgid "Creating a ULID object and inspecting it:" +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:425 +msgid "tarantool> u = ulid()\n" +"---\n" +"...\n" +"\n" +"tarantool> #u:bin(), #u:str(), type(u), u:isnil()\n" +"---\n" +"- 16\n" +"- 26\n" +"- cdata\n" +"- false\n" +"...\n" +"\n" +"tarantool> tostring(u) == u:str()\n" +"---\n" +"- true\n" +"..." +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:444 +msgid "Converting between string and binary formats:" +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:446 +msgid "tarantool> s = ulid.str()\n" +"tarantool> s\n" +"---\n" +"- 06DGE70CPFDV344XX43687N1SM\n" +"...\n" +"\n" +"tarantool> u = ulid.fromstr(s)\n" +"tarantool> u:str() == s\n" +"---\n" +"- true\n" +"...\n" +"\n" +"tarantool> b = u:bin()\n" +"tarantool> u2 = ulid.frombin(b)\n" +"tarantool> u2 == u\n" +"---\n" +"- true\n" +"..." +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:467 +msgid "Working with ``ulid.NULL``:" +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:469 +msgid "tarantool> ulid.NULL\n" +"---\n" +"- 00000000000000000000000000\n" +"...\n" +"\n" +"tarantool> ulid.NULL:isnil()\n" +"---\n" +"- true\n" +"...\n" +"\n" +"tarantool> ulid.new():isnil()\n" +"---\n" +"- false\n" +"..." +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:486 +msgid "Comparison operators:" +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:488 +msgid "tarantool> u1 = ulid.new()\n" +"tarantool> u2 = ulid.new()\n" +"tarantool> u1 < u2\n" +"---\n" +"- true\n" +"..." +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:497 +msgid "Checking types:" +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:499 +msgid "tarantool> u = ulid.new()\n" +"tarantool> ulid.is_ulid(u)\n" +"---\n" +"- true\n" +"...\n" +"\n" +"tarantool> ulid.is_ulid(\"06DGE7RJK8QWJE27X5VVCC5VDW\")\n" +"---\n" +"- false\n" +"..." +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:512 +msgid "Generating many ULIDs:" +msgstr "" + +#: ../../doc/reference/reference_lua/ulid.rst:514 +msgid "tarantool> for i = 1,5 do print(ulid.str()) end\n" +"---\n" +"06DGE7T8AJD6EDNJ3VQ2ZYB3R4\n" +"06DGE7T8AJD6EDNJ3VQ2ZYB3R8\n" +"06DGE7T8AJD6EDNJ3VQ2ZYB3RC\n" +"06DGE7T8AJD6EDNJ3VQ2ZYB3RG\n" +"06DGE7T8AJD6EDNJ3VQ2ZYB3RM\n" +"..." +msgstr "" diff --git a/locale/ru/LC_MESSAGES/reference/reference_lua/ulid.po b/locale/ru/LC_MESSAGES/reference/reference_lua/ulid.po new file mode 100644 index 0000000000..3c4af8abf8 --- /dev/null +++ b/locale/ru/LC_MESSAGES/reference/reference_lua/ulid.po @@ -0,0 +1,793 @@ + +msgid "Module ulid" +msgstr "Модуль ulid" + +msgid "Since version 3.6.0." +msgstr "Начиная с версии 3.6.0." + +msgid "Overview" +msgstr "Обзор" + +msgid "" +"The ``ulid`` module implements ULID (Universally Unique Lexicographically" +" Sortable Identifier) support in Tarantool. A ULID is a 128-bit " +"identifier consisting of:" +msgstr "" +"Модуль ``ulid`` реализует поддержку ULID (Universally Unique Lexicographically " +"Sortable Identifier) в Tarantool. ULID - это 128-битный идентификатор, " +"состоящий из:" + +msgid "a 48-bit timestamp in milliseconds since the Unix epoch" +msgstr "48-битной временной метки в миллисекундах от эпохи Unix" + +msgid "an 80-bit random (entropy) component" +msgstr "80-битной случайной (энтропийной) части" + +msgid "" +"ULID strings are encoded using **Crockford Base32**, a compact and human-" +"friendly alphabet that excludes visually ambiguous characters." +msgstr "" +"Строки ULID кодируются с использованием **Crockford Base32** - компактного и " +"удобного, человекочитаемого алфавита, который исключает визуально неоднозначные символы." + +msgid "" +"In binary form, ULIDs are represented as 16-byte values in **big-endian**" +" byte order. This ensures that the lexicographical order of binary ULIDs " +"matches their chronological order, in accordance with the ULID " +"specification." +msgstr "" +"В бинарном виде ULID представлен 16-байтным значением в порядке байт **big-endian**. " +"Это гарантирует, что лексикографический порядок бинарных ULID совпадает с их " +"хронологическим порядком, как и требуется спецификацией ULID." + +msgid "ULIDs have several useful properties:" +msgstr "ULID обладают рядом полезных свойств:" + +msgid "They are lexicographically sortable by creation time." +msgstr "Они лексикографически сортируются по времени создания." + +msgid "They fit entirely into 26 ASCII characters." +msgstr "Они полностью помещаются в 26 ASCII-символов." + +msgid "They avoid visually ambiguous symbols (``I``, ``L``, ``O``, ``U``)." +msgstr "Они избегают визуально неоднозначных символов (``I``, ``L``, ``O``, ``U``)." + +msgid "They have 128 bits of total uniqueness-same as UUID v4." +msgstr "Они имеют 128 бит общей уникальности - как UUID v4." + +msgid "" +"Tarantool uses a *monotonic* ULID generator. This ensures that multiple " +"ULIDs created within the same millisecond are strictly increasing and " +"preserve sort order: for any two ULIDs generated in the same millisecond," +" the one created later is greater than the earlier one." +msgstr "" +"Tarantool использует *монотонный* генератор ULID. Это гарантирует, что несколько " +"ULID, созданных в пределах одной миллисекунды, строго возрастают и сохраняют порядок: " +"для любых двух ULID, сгенерированных в одной и той же миллисекунде, созданный позже " +"будет больше созданного раньше." + +msgid "" +"Internally, the monotonic generator keeps the last generated ULID for the" +" current millisecond and increments the 80-bit random part for each " +"subsequent ULID. A real overflow of the random part can happen only after" +" generating ``2^80`` ULIDs within the same millisecond, which is " +"practically impossible on real hardware. However, for strict correctness " +"of the ULID specification and to avoid silent wrap-around, the " +"implementation detects this overflow and fails the next generation " +"attempt with a Lua error (``ULID random component overflow``)." +msgstr "" +"Внутри монотонный генератор хранит последний ULID для текущей миллисекунды и " +"инкрементирует 80-битную случайную часть для каждого следующего ULID. Реальное " +"переполнение случайной части возможно только после генерации ``2^80`` ULID в пределах " +"одной миллисекунды, что практически невозможно на реальном железе. Однако для строгого " +"соответствия спецификации ULID и чтобы избежать тихого переполнения (wrap-around), " +"реализация детектирует такое переполнение и завершает следующую попытку генерации " +"ошибкой Lua (``ULID random component overflow``)." + +msgid "To use this module, run the following command:" +msgstr "Чтобы использовать модуль, выполните команду:" + +msgid "ulid = require('ulid')" +msgstr "ulid = require('ulid')" + +msgid "Comparison" +msgstr "Сравнение" + +msgid "ULID objects support the full set of Lua comparison operators:" +msgstr "Объекты ULID поддерживают полный набор операторов сравнения Lua:" + +msgid "``==`` and ``~=`` - equality and inequality." +msgstr "``==`` и ``~=`` - равенство и неравенство." + +msgid "``<`` and ``<=`` - lexicographical comparison." +msgstr "``<`` и ``<=`` - лексикографическое сравнение." + +msgid "``>`` and ``>=`` - lexicographical comparison." +msgstr "``>`` и ``>=`` - лексикографическое сравнение." + +msgid "" +"The comparison is based on the internal 16-byte representation in big-" +"endian order and is consistent with the ULID specification: for ULIDs " +"created by the monotonic generator, later ULIDs are greater than earlier " +"ones, including ULIDs generated within the same millisecond." +msgstr "" +"Сравнение основано на внутреннем 16-байтном представлении в порядке big-endian и " +"соответствует спецификации ULID: для ULID, созданных монотонным генератором, более " +"поздние ULID больше более ранних, включая ULID, сгенерированные в пределах одной " +"миллисекунды." + +msgid "" +"Comparison works both between ULID objects and between a ULID object and " +"a ULID string:" +msgstr "" +"Сравнение работает как между объектами ULID, так и между объектом ULID и строкой ULID:" + +msgid "``u1 == u2`` compares two ULID objects directly." +msgstr "``u1 == u2`` напрямую сравнивает два объекта ULID." + +msgid "``u1 == \"01...\"`` converts the string to ULID and compares values." +msgstr "``u1 == \"01...\"`` преобразует строку в ULID и сравнивает значения." + +msgid "" +"``u1 < \"01...\"`` or ``\"01...\" < u1`` convert the string argument to " +"ULID and perform lexicographical comparison." +msgstr "" +"``u1 < \"01...\"`` или ``\"01...\" < u1`` преобразуют строковый аргумент в ULID " +"и выполняют лексикографическое сравнение." + +msgid "Examples:" +msgstr "Примеры:" + +msgid "" +"tarantool> u1 = ulid.new()\n" +"tarantool> u2 = ulid.new()\n" +"tarantool> u1 < u2, u1 <= u2, u1 == u2, u1 ~= u2, u1 > u2, u1 >= u2\n" +"---\n" +"- true\n" +"- true\n" +"- false\n" +"- true\n" +"- false\n" +"- false\n" +"...\n" +"\n" +"tarantool> u = ulid.new()\n" +"tarantool> s = u:str()\n" +"tarantool> u == s, u < s, u > s\n" +"---\n" +"- true\n" +"- false\n" +"- false\n" +"...\n" +"\n" +"tarantool> u == \"not-a-valid-ulid\"\n" +"---\n" +"- false\n" +"...\n" +"\n" +"tarantool> u < \"not-a-valid-ulid\"\n" +"---\n" +"- error: '[string \"return u < \"not-a-valid-ulid\"\"]:1: incorrect value" +" to convert to\n" +" ulid as 2 argument'\n" +"..." +msgstr "" +"tarantool> u1 = ulid.new()\n" +"tarantool> u2 = ulid.new()\n" +"tarantool> u1 < u2, u1 <= u2, u1 == u2, u1 ~= u2, u1 > u2, u1 >= u2\n" +"---\n" +"- true\n" +"- true\n" +"- false\n" +"- true\n" +"- false\n" +"- false\n" +"...\n" +"\n" +"tarantool> u = ulid.new()\n" +"tarantool> s = u:str()\n" +"tarantool> u == s, u < s, u > s\n" +"---\n" +"- true\n" +"- false\n" +"- false\n" +"...\n" +"\n" +"tarantool> u == \"not-a-valid-ulid\"\n" +"---\n" +"- false\n" +"...\n" +"\n" +"tarantool> u < \"not-a-valid-ulid\"\n" +"---\n" +"- error: '[string \"return u < \"not-a-valid-ulid\"\"]:1: incorrect value" +" to convert to\n" +" ulid as 2 argument'\n" +"..." + +msgid "API Reference" +msgstr "Справочник API" + +msgid "Below is list of all ``ulid`` functions and members." +msgstr "Ниже приведён список всех функций и членов модуля ``ulid``." + +msgid "Name" +msgstr "Имя" + +msgid "Use" +msgstr "Назначение" + +msgid ":ref:`ulid.NULL `" +msgstr ":ref:`ulid.NULL `" + +msgid "A nil ULID object" +msgstr "Нулевой объект ULID" + +msgid "" +":ref:`ulid.ulid() ` |br| :ref:`ulid.bin() ` |br| " +":ref:`ulid.str() `" +msgstr "" +":ref:`ulid.ulid() ` |br| :ref:`ulid.bin() ` |br| " +":ref:`ulid.str() `" + +msgid "Shortcuts to create a new ULID value" +msgstr "Сокращения для создания нового значения ULID" + +msgid ":ref:`ulid.new() `" +msgstr ":ref:`ulid.new() `" + +msgid "Create a new ULID object" +msgstr "Создать новый объект ULID" + +msgid "" +":ref:`ulid.fromstr() ` |br| :ref:`ulid.frombin() ` |br| :ref:`ulid_object:bin() ` |br| " +":ref:`ulid_object:str() `" +msgstr "" +":ref:`ulid.fromstr() ` |br| :ref:`ulid.frombin() ` |br| :ref:`ulid_object:bin() ` |br| " +":ref:`ulid_object:str() `" + +msgid "Convert between string, binary, and ULID object forms" +msgstr "Преобразование между строкой, бинарным видом и объектом ULID" + +msgid "" +":ref:`ulid.is_ulid() ` |br| :ref:`ulid_object:isnil() " +"`" +msgstr "" +":ref:`ulid.is_ulid() ` |br| :ref:`ulid_object:isnil() " +"`" + +msgid "Check ULID type or nil value" +msgstr "Проверка типа ULID или нулевого значения" + +msgid "A nil ULID object - a ULID that contains 16 zero bytes." +msgstr "Нулевой объект ULID - ULID, содержащий 16 нулевых байт." + +msgid "return" +msgstr "return" + +msgid "the nil ULID value" +msgstr "нулевое значение ULID" + +msgid "rtype" +msgstr "rtype" + +msgid "cdata" +msgstr "cdata" + +msgid "Example:" +msgstr "Пример:" + +msgid "" +"tarantool> ulid.NULL\n" +"---\n" +"- 00000000000000000000000000\n" +"..." +msgstr "" +"tarantool> ulid.NULL\n" +"---\n" +"- 00000000000000000000000000\n" +"..." + +msgid "Create a new ULID object." +msgstr "Создать новый объект ULID." + +msgid "" +"This function uses the monotonic generator described in the " +":ref:`overview `. Multiple ULIDs created within the same " +"millisecond are strictly increasing." +msgstr "" +"Эта функция использует монотонный генератор, описанный в разделе " +":ref:`overview `. Несколько ULID, созданных в пределах одной " +"миллисекунды, строго возрастают." + +msgid "a new ULID object" +msgstr "новый объект ULID" + +msgid "" +"tarantool> ulid.new()\n" +"---\n" +"- 06DGE3YNDCM2PPWJT3SKTTRNZR\n" +"..." +msgstr "" +"tarantool> ulid.new()\n" +"---\n" +"- 06DGE3YNDCM2PPWJT3SKTTRNZR\n" +"..." + +msgid "Calling the module directly is the same as calling :func:`ulid.new()`." +msgstr "Вызов модуля напрямую эквивалентен вызову :func:`ulid.new()`." + +msgid "In other words, ``ulid()`` is a shortcut for ``ulid.new()``." +msgstr "Иными словами, ``ulid()`` - это сокращение для ``ulid.new()``." + +msgid "a new ULID object (same as :func:`ulid.new`)" +msgstr "новый объект ULID (то же самое, что :func:`ulid.new`)" + +msgid "" +"tarantool> ulid()\n" +"---\n" +"- 06DGE41G63GAZ6F0TV4WRSVCCW\n" +"..." +msgstr "" +"tarantool> ulid()\n" +"---\n" +"- 06DGE41G63GAZ6F0TV4WRSVCCW\n" +"..." + +msgid "Create a new ULID and return its **string** representation." +msgstr "Создать новый ULID и вернуть его **строковое** представление." + +msgid "This is a shortcut for ``ulid.new():str()``." +msgstr "Это сокращение для ``ulid.new():str()``." + +msgid "The result is always 26 characters, encoded using Crockford Base32." +msgstr "Результат всегда имеет длину 26 символов и кодируется Crockford Base32." + +msgid "a ULID string" +msgstr "строка ULID" + +msgid "26-byte string" +msgstr "строка длиной 26 байт" + +msgid "" +"tarantool> ulid.str()\n" +"---\n" +"- 06DGE480BWZ6H5BKX0KS3Q8S2G\n" +"..." +msgstr "" +"tarantool> ulid.str()\n" +"---\n" +"- 06DGE480BWZ6H5BKX0KS3Q8S2G\n" +"..." + +msgid "" +"Create a new ULID and return its **binary** representation as a 16-byte " +"string." +msgstr "" +"Создать новый ULID и вернуть его **бинарное** представление в виде строки длиной 16 байт." + +msgid "This is a shortcut for ``ulid.new():bin()``." +msgstr "Это сокращение для ``ulid.new():bin()``." + +msgid "a ULID in binary form" +msgstr "ULID в бинарном виде" + +msgid "16-byte string" +msgstr "строка длиной 16 байт" + +msgid "" +"tarantool> #ulid.bin()\n" +"---\n" +"- 16\n" +"..." +msgstr "" +"tarantool> #ulid.bin()\n" +"---\n" +"- 16\n" +"..." + +msgid "Create a ULID object from a 26-character string." +msgstr "Создать объект ULID из 26-символьной строки." + +msgid "" +"The input must be a valid ULID string encoded using Crockford Base32. If " +"the string is invalid (wrong length or invalid symbols), ``nil`` is " +"returned." +msgstr "" +"Входным значением должна быть корректная строка ULID, закодированная Crockford Base32. " +"Если строка некорректна (неверная длина или недопустимые символы), возвращается ``nil``." + +msgid "Parameters" +msgstr "Параметры" + +msgid "Return" +msgstr "Возвращает" + +msgid "Return type" +msgstr "Тип возвращаемого значения" + +msgid "ULID in 26-character string form" +msgstr "ULID в виде 26-символьной строки" + +msgid "converted ULID or ``nil``" +msgstr "преобразованный ULID или ``nil``" + +msgid "cdata or ``nil``" +msgstr "cdata или ``nil``" + +msgid "" +"tarantool> u = ulid.fromstr('06DGE4FH80PHA28YZVV5Z473T4')\n" +"tarantool> u\n" +"---\n" +"- 06DGE4FH80PHA28YZVV5Z473T4\n" +"..." +msgstr "" +"tarantool> u = ulid.fromstr('06DGE4FH80PHA28YZVV5Z473T4')\n" +"tarantool> u\n" +"---\n" +"- 06DGE4FH80PHA28YZVV5Z473T4\n" +"..." + +msgid "Create a ULID object from a 16-byte binary string." +msgstr "Создать объект ULID из 16-байтной бинарной строки." + +msgid "ULID in 16-byte binary string form" +msgstr "ULID в виде 16-байтной бинарной строки" + +msgid "converted ULID" +msgstr "преобразованный ULID" + +msgid "" +"tarantool> u1 = ulid.new()\n" +"tarantool> b = u1:bin()\n" +"tarantool> u2 = ulid.frombin(b)\n" +"tarantool> u1 == u2\n" +"---\n" +"- true\n" +"..." +msgstr "" +"tarantool> u1 = ulid.new()\n" +"tarantool> b = u1:bin()\n" +"tarantool> u2 = ulid.frombin(b)\n" +"tarantool> u1 == u2\n" +"---\n" +"- true\n" +"..." + +msgid "Check if the given value is a ULID cdata object." +msgstr "Проверить, является ли переданное значение объектом ULID (cdata)." + +msgid "a value of any type" +msgstr "значение любого типа" + +msgid "``true`` if the value is a ULID, otherwise ``false``" +msgstr "``true``, если значение является ULID, иначе ``false``" + +msgid "boolean" +msgstr "boolean" + +msgid "" +"tarantool> ulid.is_ulid(ulid.new())\n" +"---\n" +"- true\n" +"...\n" +"\n" +"tarantool> ulid.is_ulid(\"string\")\n" +"---\n" +"- false\n" +"..." +msgstr "" +"tarantool> ulid.is_ulid(ulid.new())\n" +"---\n" +"- true\n" +"...\n" +"\n" +"tarantool> ulid.is_ulid(\"string\")\n" +"---\n" +"- false\n" +"..." + +msgid "ULID object" +msgstr "Объект ULID" + +msgid "" +"A ULID object returned by :func:`ulid.new`, :func:`ulid.fromstr`, or " +":func:`ulid.frombin` provides the following methods:" +msgstr "" +"Объект ULID, возвращаемый :func:`ulid.new`, :func:`ulid.fromstr` или " +":func:`ulid.frombin`, предоставляет следующие методы:" + +msgid "Return the ULID as a 16-byte binary string." +msgstr "Вернуть ULID в виде 16-байтной бинарной строки." + +msgid "ULID in binary form" +msgstr "ULID в бинарном виде" + +msgid "" +"tarantool> u = ulid.new()\n" +"tarantool> b = u:bin()\n" +"tarantool> #b, b\n" +"---\n" +"- 16\n" +"- \"\\x01\\x9B\\a\\xAD==\\x81u۶-\\x93hPa\\xAE\"\n" +"..." +msgstr "" +"tarantool> u = ulid.new()\n" +"tarantool> b = u:bin()\n" +"tarantool> #b, b\n" +"---\n" +"- 16\n" +"- \"\\x01\\x9B\\a\\xAD==\\x81u۶-\\x93hPa\\xAE\"\n" +"..." + +msgid "Return the ULID as a 26-character string." +msgstr "Вернуть ULID в виде 26-символьной строки." + +msgid "ULID in string form" +msgstr "ULID в строковом виде" + +msgid "" +"ULID objects also implement the standard Lua ``__tostring`` metamethod. " +"This means that calling ``tostring(u)`` for a ULID object ``u`` returns " +"the same value as ``u:str()``, and ULID objects are automatically " +"converted to their 26-character string representation when needed " +"in string context." +msgstr "" +"Объекты ULID также реализуют стандартный Lua-метаметод ``__tostring``. " +"Это означает, что вызов ``tostring(u)`` для ULID-объекта ``u`` возвращает " +"то же значение, что и ``u:str()``, а ULID-объекты автоматически " +"преобразуются в своё 26-символьное строковое представление, когда это нужно " +"в строковом контексте." + +msgid "" +"tarantool> u = ulid.new()\n" +"tarantool> u:str(), tostring(u)\n" +"---\n" +"- 06DGFBE3J07B7DB5A3JP4WQ9CM\n" +"- 06DGFBE3J07B7DB5A3JP4WQ9CM\n" +"..." +msgstr "" +"tarantool> u = ulid.new()\n" +"tarantool> u:str(), tostring(u)\n" +"---\n" +"- 06DGFBE3J07B7DB5A3JP4WQ9CM\n" +"- 06DGFBE3J07B7DB5A3JP4WQ9CM\n" +"..." + +msgid "Check if the ULID is the nil ULID (all 16 bytes are zero)." +msgstr "Проверить, является ли ULID нулевым (все 16 байт равны нулю)." + +msgid "``true`` for :data:`ulid.NULL`, otherwise ``false``" +msgstr "``true`` для :data:`ulid.NULL`, иначе ``false``" + +msgid "" +"tarantool> ulid.NULL:isnil()\n" +"---\n" +"- true\n" +"...\n" +"\n" +"tarantool> ulid.new():isnil()\n" +"---\n" +"- false\n" +"..." +msgstr "" +"tarantool> ulid.NULL:isnil()\n" +"---\n" +"- true\n" +"...\n" +"\n" +"tarantool> ulid.new():isnil()\n" +"---\n" +"- false\n" +"..." + +msgid "Examples" +msgstr "Примеры" + +msgid "Basic usage:" +msgstr "Базовое использование:" + +msgid "" +"tarantool> u_obj = ulid.new()\n" +"tarantool> u_str = ulid.str()\n" +"tarantool> u_bin = ulid.bin()\n" +"\n" +"tarantool> u_obj, u_str, u_bin\n" +"---\n" +"- 06DGE6SEZDCFFSFEAJFMC9YQAR\n" +"- 06DGE6T0DW0N2N6KMPVZ8SGE4W\n" +"- \"\\x01\\x9B\\a\\eSz8\\xBA\\xB3\\xC5\\xCC\\xFE\\x18\\xBB1\\xD6\"\n" +"..." +msgstr "" +"tarantool> u_obj = ulid.new()\n" +"tarantool> u_str = ulid.str()\n" +"tarantool> u_bin = ulid.bin()\n" +"\n" +"tarantool> u_obj, u_str, u_bin\n" +"---\n" +"- 06DGE6SEZDCFFSFEAJFMC9YQAR\n" +"- 06DGE6T0DW0N2N6KMPVZ8SGE4W\n" +"- \"\\x01\\x9B\\a\\eSz8\\xBA\\xB3\\xC5\\xCC\\xFE\\x18\\xBB1\\xD6\"\n" +"..." + +msgid "Creating a ULID object and inspecting it:" +msgstr "Создание объекта ULID и просмотр его свойств:" + +msgid "" +"tarantool> u = ulid()\n" +"---\n" +"...\n" +"\n" +"tarantool> #u:bin(), #u:str(), type(u), u:isnil()\n" +"---\n" +"- 16\n" +"- 26\n" +"- cdata\n" +"- false\n" +"...\n" +"\n" +"tarantool> tostring(u) == u:str()\n" +"---\n" +"- true\n" +"..." +msgstr "" +"tarantool> u = ulid()\n" +"---\n" +"...\n" +"\n" +"tarantool> #u:bin(), #u:str(), type(u), u:isnil()\n" +"---\n" +"- 16\n" +"- 26\n" +"- cdata\n" +"- false\n" +"...\n" +"\n" +"tarantool> tostring(u) == u:str()\n" +"---\n" +"- true\n" +"..." + +msgid "Converting between string and binary formats:" +msgstr "Преобразование между строковым и бинарным форматами:" + +msgid "" +"tarantool> s = ulid.str()\n" +"tarantool> s\n" +"---\n" +"- 06DGE70CPFDV344XX43687N1SM\n" +"...\n" +"\n" +"tarantool> u = ulid.fromstr(s)\n" +"tarantool> u:str() == s\n" +"---\n" +"- true\n" +"...\n" +"\n" +"tarantool> b = u:bin()\n" +"tarantool> u2 = ulid.frombin(b)\n" +"tarantool> u2 == u\n" +"---\n" +"- true\n" +"..." +msgstr "" +"tarantool> s = ulid.str()\n" +"tarantool> s\n" +"---\n" +"- 06DGE70CPFDV344XX43687N1SM\n" +"...\n" +"\n" +"tarantool> u = ulid.fromstr(s)\n" +"tarantool> u:str() == s\n" +"---\n" +"- true\n" +"...\n" +"\n" +"tarantool> b = u:bin()\n" +"tarantool> u2 = ulid.frombin(b)\n" +"tarantool> u2 == u\n" +"---\n" +"- true\n" +"..." + +msgid "Working with ``ulid.NULL``:" +msgstr "Работа с ``ulid.NULL``:" + +msgid "" +"tarantool> ulid.NULL\n" +"---\n" +"- 00000000000000000000000000\n" +"...\n" +"\n" +"tarantool> ulid.NULL:isnil()\n" +"---\n" +"- true\n" +"...\n" +"\n" +"tarantool> ulid.new():isnil()\n" +"---\n" +"- false\n" +"..." +msgstr "" +"tarantool> ulid.NULL\n" +"---\n" +"- 00000000000000000000000000\n" +"...\n" +"\n" +"tarantool> ulid.NULL:isnil()\n" +"---\n" +"- true\n" +"...\n" +"\n" +"tarantool> ulid.new():isnil()\n" +"---\n" +"- false\n" +"..." + +msgid "Comparison operators:" +msgstr "Операторы сравнения:" + +msgid "" +"tarantool> u1 = ulid.new()\n" +"tarantool> u2 = ulid.new()\n" +"tarantool> u1 < u2\n" +"---\n" +"- true\n" +"..." +msgstr "" +"tarantool> u1 = ulid.new()\n" +"tarantool> u2 = ulid.new()\n" +"tarantool> u1 < u2\n" +"---\n" +"- true\n" +"..." + +msgid "Checking types:" +msgstr "Проверка типов:" + +msgid "" +"tarantool> u = ulid.new()\n" +"tarantool> ulid.is_ulid(u)\n" +"---\n" +"- true\n" +"...\n" +"\n" +"tarantool> ulid.is_ulid(\"06DGE7RJK8QWJE27X5VVCC5VDW\")\n" +"---\n" +"- false\n" +"..." +msgstr "" +"tarantool> u = ulid.new()\n" +"tarantool> ulid.is_ulid(u)\n" +"---\n" +"- true\n" +"...\n" +"\n" +"tarantool> ulid.is_ulid(\"06DGE7RJK8QWJE27X5VVCC5VDW\")\n" +"---\n" +"- false\n" +"..." + +msgid "Generating many ULIDs:" +msgstr "Генерация множества ULID:" + +msgid "" +"tarantool> for i = 1,5 do print(ulid.str()) end\n" +"---\n" +"06DGE7T8AJD6EDNJ3VQ2ZYB3R4\n" +"06DGE7T8AJD6EDNJ3VQ2ZYB3R8\n" +"06DGE7T8AJD6EDNJ3VQ2ZYrB3RC\n" +"06DGE7T8AJD6EDNJ3VQ2ZYB3RG\n" +"06DGE7T8AJD6EDNJ3VQ2ZYB3RM\n" +"..." +msgstr "" +"tarantool> for i = 1,5 do print(ulid.str()) end\n" +"---\n" +"06DGE7T8AJD6EDNJ3VQ2ZYB3R4\n" +"06DGE7T8AJD6EDNJ3VQ2ZYB3R8\n" +"06DGE7T8AJD6EDNJ3VQ2ZYB3RC\n" +"06DGE7T8AJD6EDNJ3VQ2ZYB3RG\n" +"06DGE7T8AJD6EDNJ3VQ2ZYB3RM\n" +"..."