Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
tarantool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
core
tarantool
Commits
686d567f
Commit
686d567f
authored
13 years ago
by
Konstantin Osipov
Browse files
Options
Downloads
Patches
Plain Diff
User guide: document some box.index methods.
parent
b6ae6e33
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
doc/user/stored-programs.xml
+56
-9
56 additions, 9 deletions
doc/user/stored-programs.xml
with
56 additions
and
9 deletions
doc/user/stored-programs.xml
+
56
−
9
View file @
686d567f
...
...
@@ -578,8 +578,8 @@ Note: the administrative console output must be YAML-compatible.
<title>
Package
<code
xml:id=
"box.tuple"
xreflabel=
"box.tuple"
>
box.tuple
</code></title>
<para>
The package contains no functions, but stands for
<code>
box.tuple
</code>
userdata type. It is possible to access individual
tuple fields using an index,
or
iterate over all fields in a
tuple. Tuples are immutable.
</para>
tuple fields using an index, iterate over all fields in a
tuple
or convert a tuple to a Lua table
. Tuples are immutable.
</para>
<varlistentry>
<term><emphasis
role=
"lua"
>
</emphasis></term>
<listitem><para>
...
...
@@ -610,6 +610,15 @@ efg
ghq
qkl
...
localhost> lua t:unpack()
---
-
- abc
- cde
- efg
- ghq
- qkl
...
</programlisting>
</para></listitem>
...
...
@@ -751,14 +760,9 @@ localhost> lua for k,v in box.space[0]:pairs() do print(v) end
xreflabel=
"box.index"
>
box.index
</code></title>
<para>
This package implements methods of type
<code>
box.index
</code>
.
</para>
<varlistentry>
<term><emphasis
role=
"lua"
>
index.n
</emphasis></term>
<listitem><simpara>
Ordinal index number in the space,
<code>
space.index[i].n == i
</code>
.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><emphasis
role=
"lua"
>
index.enabled
</emphasis></term>
<term><emphasis
role=
"lua"
>
index.unique
</emphasis></term>
<listitem><simpara>
Whether or not this index is enabled in the
configuration file.
Boolean, true if the index is unique.
</simpara></listitem>
</varlistentry>
...
...
@@ -771,6 +775,15 @@ xreflabel="box.index">box.index</code></title>
</simpara></listitem>
</varlistentry>
<varlistentry>
<term>
<emphasis
role=
"lua"
>
index.key_field[]
</emphasis>
</term>
<listitem><simpara>
An array describing index key fields.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term>
<emphasis
role=
"lua"
>
index.idx
</emphasis>
...
...
@@ -789,6 +802,40 @@ xreflabel="box.index">box.index</code></title>
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<emphasis
role=
"lua"
>
index:min()
</emphasis>
</term>
<listitem><simpara>
The smallest value in the index. Available only for
indexes of type 'TREE'.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<emphasis
role=
"lua"
>
index:max()
</emphasis>
</term>
<listitem><simpara>
The biggest value in the index. Available only for
indexes of type 'TREE'.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<emphasis
role=
"lua"
>
index:next()
</emphasis>
</term>
<listitem><simpara>
This function can be used for positioned iteration, or
resuming iteration from a given key.
</simpara>
</listitem>
</varlistentry>
</variablelist>
<variablelist>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment