Skip to content

Update translation sources #1878

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
241 changes: 4 additions & 237 deletions locale/en/book/box/data_model.pot
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,16 @@ msgstr ""
msgid "Indexes"
msgstr ""

msgid "Read the full information about indexes on page :doc:`Indexes </book/box/indexes>`."
msgstr ""

msgid "An **index** is a group of key values and pointers."
msgstr ""

msgid "As with spaces, you should specify the index **name**, and let Tarantool come up with a unique **numeric identifier** (\"index id\")."
msgstr ""

msgid "An index always has a **type**. The default index type is 'TREE'. TREE indexes are provided by all Tarantool engines, can index unique and non-unique values, support partial key searches, comparisons and ordered results. Additionally, memtx engine supports HASH, RTREE and BITSET indexes."
msgid "An index always has a **type**. The default index type is :ref:`TREE <indexes-tree>`. TREE indexes are provided by all Tarantool engines, can index unique and non-unique values, support partial key searches, comparisons and ordered results. Additionally, memtx engine supports :ref:`HASH <indexes-hash>`, :ref:`RTREE <indexes-rtree>` and :ref:`BITSET <indexes-bitset>` indexes."
msgstr ""

msgid "An index may be **multi-part**, that is, you can declare that an index key value is composed of two or more fields in the tuple, in any order. For example, for an ordinary TREE index, the maximum number of parts is 255."
Expand All @@ -65,39 +68,6 @@ msgstr ""
msgid "The first index defined on a space is called the **primary key index**, and it must be unique. All other indexes are called **secondary indexes**, and they may be non-unique."
msgstr ""

msgid "An index definition may include identifiers of tuple fields and their expected **types**. See allowed indexed field types :ref:`here <index-box_indexed-field-types>`."
msgstr ""

msgid "A recommended design pattern for a data model is to base primary keys on the first fields of a tuple, because this speeds up tuple comparison."
msgstr ""

msgid "In our example, we first defined the primary index (named 'primary') based on field #1 of each tuple:"
msgstr ""

msgid "tarantool> i = s:create_index('primary', {type = 'hash', parts = {{field = 1, type = 'unsigned'}}}"
msgstr ""

msgid "The effect is that, for all tuples in space 'tester', field #1 must exist and must contain an unsigned integer. The index type is 'hash', so values in field #1 must be unique, because keys in HASH indexes are unique."
msgstr ""

msgid "After that, we defined a secondary index (named 'secondary') based on field #2 of each tuple:"
msgstr ""

msgid "tarantool> i = s:create_index('secondary', {type = 'tree', parts = {field = 2, type = 'string'}})"
msgstr ""

msgid "The effect is that, for all tuples in space 'tester', field #2 must exist and must contain a string. The index type is 'tree', so values in field #2 must not be unique, because keys in TREE indexes may be non-unique."
msgstr ""

msgid "Space definitions and index definitions are stored permanently in Tarantool's system spaces :ref:`_space <box_space-space>` and :ref:`_index <box_space-index>` (for details, see reference on :ref:`box.space <box_space>` submodule)."
msgstr ""

msgid "You can add, drop, or alter the definitions at runtime, with some restrictions. See syntax details in reference on :ref:`box <box-module>` module."
msgstr ""

msgid "Read more about index operations :ref:`here <index-box_index-operations>`."
msgstr ""

msgid "Data types"
msgstr ""

Expand Down Expand Up @@ -786,209 +756,6 @@ msgstr ""
msgid "Besides Lua, you can use :ref:`Perl, PHP, Python or other programming language connectors <index-box_connectors>`. The client server protocol is open and documented. See this :ref:`annotated BNF <box_protocol-iproto_protocol>`."
msgstr ""

msgid "Index operations"
msgstr ""

msgid "Index operations are automatic: if a data-manipulation request changes a tuple, then it also changes the index keys defined for the tuple."
msgstr ""

msgid "The simple index-creation operation that we've illustrated before is:"
msgstr ""

msgid ":samp:`box.space.{space-name}:create_index('{index-name}')`"
msgstr ""

msgid "This creates a unique TREE index on the first field of all tuples (often called \"Field#1\"), which is assumed to be numeric."
msgstr ""

msgid "The simple SELECT request that we've illustrated before is:"
msgstr ""

msgid ":extsamp:`box.space.{*{space-name}*}:select({*{value}*})`"
msgstr ""

msgid "This looks for a single tuple via the first index. Since the first index is always unique, the maximum number of returned tuples will be: one. You can call ``select()`` without arguments, causing all tuples to be returned."
msgstr ""

msgid "Let's continue working with the space 'tester' created in the :ref:`\"Getting started\" exercises <getting_started_db>` but first modify it:"
msgstr ""

msgid "tarantool> box.space.tester:format({\n"
" > {name = 'id', type = 'unsigned'},\n"
" > {name = 'band_name', type = 'string'},\n"
" > {name = 'year', type = 'unsigned'},\n"
" > {name = 'rate', type = 'unsigned', is_nullable=true}})\n"
"---\n"
"..."
msgstr ""

msgid "Add the rate to the tuple #1 and #2:"
msgstr ""

msgid "tarantool> box.space.tester:update(1, {{'=', 4, 5}})\n"
"---\n"
"- [1, 'Roxette', 1986, 5]\n"
"...\n"
"tarantool> box.space.tester:update(2, {{'=', 4, 4}})\n"
"---\n"
"- [2, 'Scorpions', 2015, 4]\n"
"..."
msgstr ""

msgid "And insert another tuple:"
msgstr ""

msgid "tarantool> box.space.tester:insert({4, 'Roxette', 2016, 3})\n"
"---\n"
"- [4, 'Roxette', 2016, 3]\n"
"..."
msgstr ""

msgid "**The existing SELECT variations:**"
msgstr ""

msgid "The search can use comparisons other than equality."
msgstr ""

msgid "tarantool> box.space.tester:select(1, {iterator = 'GT'})\n"
"---\n"
"- - [2, 'Scorpions', 2015, 4]\n"
" - [3, 'Ace of Base', 1993]\n"
" - [4, 'Roxette', 2016, 3]\n"
"..."
msgstr ""

msgid "The :ref:`comparison operators <box_index-iterator-types>` are LT, LE, EQ, REQ, GE, GT (for \"less than\", \"less than or equal\", \"equal\", \"reversed equal\", \"greater than or equal\", \"greater than\" respectively). Comparisons make sense if and only if the index type is ‘TREE'."
msgstr ""

msgid "This type of search may return more than one tuple; if so, the tuples will be in descending order by key when the comparison operator is LT or LE or REQ, otherwise in ascending order."
msgstr ""

msgid "The search can use a secondary index."
msgstr ""

msgid "For a primary-key search, it is optional to specify an index name. For a secondary-key search, it is mandatory."
msgstr ""

msgid "tarantool> box.space.tester:create_index('secondary', {parts = {{field=3, type='unsigned'}}})\n"
"---\n"
"- unique: true\n"
" parts:\n"
" - type: unsigned\n"
" is_nullable: false\n"
" fieldno: 3\n"
" id: 2\n"
" space_id: 512\n"
" type: TREE\n"
" name: secondary\n"
"...\n"
"tarantool> box.space.tester.index.secondary:select({1993})\n"
"---\n"
"- - [3, 'Ace of Base', 1993]\n"
"..."
msgstr ""

msgid "The search may be for some key parts starting with the prefix of the key. Notice that partial key searches are available only in TREE indexes."
msgstr ""

msgid "-- Create an index with three parts\n"
"tarantool> box.space.tester:create_index('tertiary', {parts = {{field = 2, type = 'string'}, {field=3, type='unsigned'}, {field=4, type='unsigned'}}})\n"
"---\n"
"- unique: true\n"
" parts:\n"
" - type: string\n"
" is_nullable: false\n"
" fieldno: 2\n"
" - type: unsigned\n"
" is_nullable: false\n"
" fieldno: 3\n"
" - type: unsigned\n"
" is_nullable: true\n"
" fieldno: 4\n"
" id: 6\n"
" space_id: 513\n"
" type: TREE\n"
" name: tertiary\n"
"...\n"
"-- Make a partial search\n"
"tarantool> box.space.tester.index.tertiary:select({'Scorpions', 2015})\n"
"---\n"
"- - [2, 'Scorpions', 2015, 4]\n"
"..."
msgstr ""

msgid "The search may be for all fields, using a table for the value:"
msgstr ""

msgid "tarantool> box.space.tester.index.tertiary:select({'Roxette', 2016, 3})\n"
"---\n"
"- - [4, 'Roxette', 2016, 3]\n"
"..."
msgstr ""

msgid "or the search can be for one field, using a table or a scalar:"
msgstr ""

msgid "tarantool> box.space.tester.index.tertiary:select({'Roxette'})\n"
"---\n"
"- - [1, 'Roxette', 1986, 5]\n"
" - [4, 'Roxette', 2016, 3]\n"
"..."
msgstr ""

msgid "Working with BITSET and RTREE"
msgstr ""

msgid "**BITSET example:**"
msgstr ""

msgid "tarantool> box.schema.space.create('bitset_example')\n"
"tarantool> box.space.bitset_example:create_index('primary')\n"
"tarantool> box.space.bitset_example:create_index('bitset',{unique=false,type='BITSET', parts={2,'unsigned'}})\n"
"tarantool> box.space.bitset_example:insert{1,1}\n"
"tarantool> box.space.bitset_example:insert{2,4}\n"
"tarantool> box.space.bitset_example:insert{3,7}\n"
"tarantool> box.space.bitset_example:insert{4,3}\n"
"tarantool> box.space.bitset_example.index.bitset:select(2, {iterator='BITS_ANY_SET'})"
msgstr ""

msgid "The result will be:"
msgstr ""

msgid "---\n"
"- - [3, 7]\n"
" - [4, 3]\n"
"..."
msgstr ""

msgid "because (7 AND 2) is not equal to 0, and (3 AND 2) is not equal to 0."
msgstr ""

msgid "**RTREE example:**"
msgstr ""

msgid "tarantool> box.schema.space.create('rtree_example')\n"
"tarantool> box.space.rtree_example:create_index('primary')\n"
"tarantool> box.space.rtree_example:create_index('rtree',{unique=false,type='RTREE', parts={2,'ARRAY'}})\n"
"tarantool> box.space.rtree_example:insert{1, {3, 5, 9, 10}}\n"
"tarantool> box.space.rtree_example:insert{2, {10, 11}}\n"
"tarantool> box.space.rtree_example.index.rtree:select({4, 7, 5, 9}, {iterator = 'GT'})"
msgstr ""

msgid "---\n"
"- - [1, [3, 5, 9, 10]]\n"
"..."
msgstr ""

msgid "because a rectangle whose corners are at coordinates ``4,7,5,9`` is entirely within a rectangle whose corners are at coordinates ``3,5,9,10``."
msgstr ""

msgid "Additionally, there exist :doc:`index iterator operations </reference/reference_lua/box_index/pairs>`. They can only be used with code in Lua and C/C++. Index iterators are for traversing indexes one key at a time, taking advantage of features that are specific to an index type, for example evaluating Boolean expressions when traversing BITSET indexes, or going in descending order when traversing TREE indexes."
msgstr ""

msgid "See also other index operations like :doc:`alter() </reference/reference_lua/box_index/alter>` (modify index) and :doc:`drop() </reference/reference_lua/box_index/drop>` (delete index) in reference for :doc:`/reference/reference_lua/box_index`."
msgstr ""

msgid "Complexity factors"
msgstr ""

Expand Down
Loading