Skip to content

Commit 21731d2

Browse files
authored
Update translation sources (#1878)
1 parent 4713147 commit 21731d2

File tree

13 files changed

+1280
-1331
lines changed

13 files changed

+1280
-1331
lines changed

locale/en/book/box/data_model.pot

Lines changed: 4 additions & 237 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,16 @@ msgstr ""
4747
msgid "Indexes"
4848
msgstr ""
4949

50+
msgid "Read the full information about indexes on page :doc:`Indexes </book/box/indexes>`."
51+
msgstr ""
52+
5053
msgid "An **index** is a group of key values and pointers."
5154
msgstr ""
5255

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

56-
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."
59+
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."
5760
msgstr ""
5861

5962
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."
@@ -65,39 +68,6 @@ msgstr ""
6568
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."
6669
msgstr ""
6770

68-
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>`."
69-
msgstr ""
70-
71-
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."
72-
msgstr ""
73-
74-
msgid "In our example, we first defined the primary index (named 'primary') based on field #1 of each tuple:"
75-
msgstr ""
76-
77-
msgid "tarantool> i = s:create_index('primary', {type = 'hash', parts = {{field = 1, type = 'unsigned'}}}"
78-
msgstr ""
79-
80-
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."
81-
msgstr ""
82-
83-
msgid "After that, we defined a secondary index (named 'secondary') based on field #2 of each tuple:"
84-
msgstr ""
85-
86-
msgid "tarantool> i = s:create_index('secondary', {type = 'tree', parts = {field = 2, type = 'string'}})"
87-
msgstr ""
88-
89-
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."
90-
msgstr ""
91-
92-
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)."
93-
msgstr ""
94-
95-
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."
96-
msgstr ""
97-
98-
msgid "Read more about index operations :ref:`here <index-box_index-operations>`."
99-
msgstr ""
100-
10171
msgid "Data types"
10272
msgstr ""
10373

@@ -786,209 +756,6 @@ msgstr ""
786756
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>`."
787757
msgstr ""
788758

789-
msgid "Index operations"
790-
msgstr ""
791-
792-
msgid "Index operations are automatic: if a data-manipulation request changes a tuple, then it also changes the index keys defined for the tuple."
793-
msgstr ""
794-
795-
msgid "The simple index-creation operation that we've illustrated before is:"
796-
msgstr ""
797-
798-
msgid ":samp:`box.space.{space-name}:create_index('{index-name}')`"
799-
msgstr ""
800-
801-
msgid "This creates a unique TREE index on the first field of all tuples (often called \"Field#1\"), which is assumed to be numeric."
802-
msgstr ""
803-
804-
msgid "The simple SELECT request that we've illustrated before is:"
805-
msgstr ""
806-
807-
msgid ":extsamp:`box.space.{*{space-name}*}:select({*{value}*})`"
808-
msgstr ""
809-
810-
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."
811-
msgstr ""
812-
813-
msgid "Let's continue working with the space 'tester' created in the :ref:`\"Getting started\" exercises <getting_started_db>` but first modify it:"
814-
msgstr ""
815-
816-
msgid "tarantool> box.space.tester:format({\n"
817-
" > {name = 'id', type = 'unsigned'},\n"
818-
" > {name = 'band_name', type = 'string'},\n"
819-
" > {name = 'year', type = 'unsigned'},\n"
820-
" > {name = 'rate', type = 'unsigned', is_nullable=true}})\n"
821-
"---\n"
822-
"..."
823-
msgstr ""
824-
825-
msgid "Add the rate to the tuple #1 and #2:"
826-
msgstr ""
827-
828-
msgid "tarantool> box.space.tester:update(1, {{'=', 4, 5}})\n"
829-
"---\n"
830-
"- [1, 'Roxette', 1986, 5]\n"
831-
"...\n"
832-
"tarantool> box.space.tester:update(2, {{'=', 4, 4}})\n"
833-
"---\n"
834-
"- [2, 'Scorpions', 2015, 4]\n"
835-
"..."
836-
msgstr ""
837-
838-
msgid "And insert another tuple:"
839-
msgstr ""
840-
841-
msgid "tarantool> box.space.tester:insert({4, 'Roxette', 2016, 3})\n"
842-
"---\n"
843-
"- [4, 'Roxette', 2016, 3]\n"
844-
"..."
845-
msgstr ""
846-
847-
msgid "**The existing SELECT variations:**"
848-
msgstr ""
849-
850-
msgid "The search can use comparisons other than equality."
851-
msgstr ""
852-
853-
msgid "tarantool> box.space.tester:select(1, {iterator = 'GT'})\n"
854-
"---\n"
855-
"- - [2, 'Scorpions', 2015, 4]\n"
856-
" - [3, 'Ace of Base', 1993]\n"
857-
" - [4, 'Roxette', 2016, 3]\n"
858-
"..."
859-
msgstr ""
860-
861-
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'."
862-
msgstr ""
863-
864-
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."
865-
msgstr ""
866-
867-
msgid "The search can use a secondary index."
868-
msgstr ""
869-
870-
msgid "For a primary-key search, it is optional to specify an index name. For a secondary-key search, it is mandatory."
871-
msgstr ""
872-
873-
msgid "tarantool> box.space.tester:create_index('secondary', {parts = {{field=3, type='unsigned'}}})\n"
874-
"---\n"
875-
"- unique: true\n"
876-
" parts:\n"
877-
" - type: unsigned\n"
878-
" is_nullable: false\n"
879-
" fieldno: 3\n"
880-
" id: 2\n"
881-
" space_id: 512\n"
882-
" type: TREE\n"
883-
" name: secondary\n"
884-
"...\n"
885-
"tarantool> box.space.tester.index.secondary:select({1993})\n"
886-
"---\n"
887-
"- - [3, 'Ace of Base', 1993]\n"
888-
"..."
889-
msgstr ""
890-
891-
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."
892-
msgstr ""
893-
894-
msgid "-- Create an index with three parts\n"
895-
"tarantool> box.space.tester:create_index('tertiary', {parts = {{field = 2, type = 'string'}, {field=3, type='unsigned'}, {field=4, type='unsigned'}}})\n"
896-
"---\n"
897-
"- unique: true\n"
898-
" parts:\n"
899-
" - type: string\n"
900-
" is_nullable: false\n"
901-
" fieldno: 2\n"
902-
" - type: unsigned\n"
903-
" is_nullable: false\n"
904-
" fieldno: 3\n"
905-
" - type: unsigned\n"
906-
" is_nullable: true\n"
907-
" fieldno: 4\n"
908-
" id: 6\n"
909-
" space_id: 513\n"
910-
" type: TREE\n"
911-
" name: tertiary\n"
912-
"...\n"
913-
"-- Make a partial search\n"
914-
"tarantool> box.space.tester.index.tertiary:select({'Scorpions', 2015})\n"
915-
"---\n"
916-
"- - [2, 'Scorpions', 2015, 4]\n"
917-
"..."
918-
msgstr ""
919-
920-
msgid "The search may be for all fields, using a table for the value:"
921-
msgstr ""
922-
923-
msgid "tarantool> box.space.tester.index.tertiary:select({'Roxette', 2016, 3})\n"
924-
"---\n"
925-
"- - [4, 'Roxette', 2016, 3]\n"
926-
"..."
927-
msgstr ""
928-
929-
msgid "or the search can be for one field, using a table or a scalar:"
930-
msgstr ""
931-
932-
msgid "tarantool> box.space.tester.index.tertiary:select({'Roxette'})\n"
933-
"---\n"
934-
"- - [1, 'Roxette', 1986, 5]\n"
935-
" - [4, 'Roxette', 2016, 3]\n"
936-
"..."
937-
msgstr ""
938-
939-
msgid "Working with BITSET and RTREE"
940-
msgstr ""
941-
942-
msgid "**BITSET example:**"
943-
msgstr ""
944-
945-
msgid "tarantool> box.schema.space.create('bitset_example')\n"
946-
"tarantool> box.space.bitset_example:create_index('primary')\n"
947-
"tarantool> box.space.bitset_example:create_index('bitset',{unique=false,type='BITSET', parts={2,'unsigned'}})\n"
948-
"tarantool> box.space.bitset_example:insert{1,1}\n"
949-
"tarantool> box.space.bitset_example:insert{2,4}\n"
950-
"tarantool> box.space.bitset_example:insert{3,7}\n"
951-
"tarantool> box.space.bitset_example:insert{4,3}\n"
952-
"tarantool> box.space.bitset_example.index.bitset:select(2, {iterator='BITS_ANY_SET'})"
953-
msgstr ""
954-
955-
msgid "The result will be:"
956-
msgstr ""
957-
958-
msgid "---\n"
959-
"- - [3, 7]\n"
960-
" - [4, 3]\n"
961-
"..."
962-
msgstr ""
963-
964-
msgid "because (7 AND 2) is not equal to 0, and (3 AND 2) is not equal to 0."
965-
msgstr ""
966-
967-
msgid "**RTREE example:**"
968-
msgstr ""
969-
970-
msgid "tarantool> box.schema.space.create('rtree_example')\n"
971-
"tarantool> box.space.rtree_example:create_index('primary')\n"
972-
"tarantool> box.space.rtree_example:create_index('rtree',{unique=false,type='RTREE', parts={2,'ARRAY'}})\n"
973-
"tarantool> box.space.rtree_example:insert{1, {3, 5, 9, 10}}\n"
974-
"tarantool> box.space.rtree_example:insert{2, {10, 11}}\n"
975-
"tarantool> box.space.rtree_example.index.rtree:select({4, 7, 5, 9}, {iterator = 'GT'})"
976-
msgstr ""
977-
978-
msgid "---\n"
979-
"- - [1, [3, 5, 9, 10]]\n"
980-
"..."
981-
msgstr ""
982-
983-
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``."
984-
msgstr ""
985-
986-
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."
987-
msgstr ""
988-
989-
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`."
990-
msgstr ""
991-
992759
msgid "Complexity factors"
993760
msgstr ""
994761

0 commit comments

Comments
 (0)