Skip to content
Snippets Groups Projects
Commit f8636531 authored by ocelot-inc's avatar ocelot-inc
Browse files

test+correct examples+links as far as end of user guide

parent c82d33f7
No related branches found
No related tags found
No related merge requests found
......@@ -505,8 +505,9 @@ that are declared in line 1, because all of them are for use only within the fun
**LINE 5: WHY "PAIRS()".** Our job is to go through all the rows and there are two
ways to do it: with :func:`box.space.space_object:pairs() <space_object.pairs>` or with
:func:`index.iterator <index_object.pairs>`.
We preferred ``pairs()`` because it is simpler.
:code:`variable = select(...)` followed by
:codenormal:`for i,`:codeitalic:`n`:codenormal:`,1 do` :codeitalic:`some-function`:codenormal:`(variable[i]) end`.
We preferred ``pairs()`` for this example.
**LINE 5: START THE MAIN LOOP.** Everything inside this ":code:`for`" loop will be
repeated as long as there is another index key. A tuple is fetched and can be
......
......@@ -140,9 +140,9 @@ the program passes the tnt_stream that was used for connection
(:code:`tnt`) and the stream that was set up with tnt_object_format (:code:`tuple`).
Function description: |br|
:codenormal:`tnt_insert(struct tnt_stream *s, uint32_t space, struct tnt_stream *tuple)` |br|
:codenormal:`tnt_replace(struct tnt_stream *s, uint32_t space, struct tnt_stream *tuple)` |br|
:codenormal:`tnt_select(struct tnt_stream *s, uint32_t space, uint32_t index, uint32_t limit, uint32_t offset, uint8_t iterator, struct tnt_stream *key)` |br|
:codenormal:`ssize_t tnt_insert(struct tnt_stream *s, uint32_t space, struct tnt_stream *tuple)` |br|
:codenormal:`ssize_t tnt_replace(struct tnt_stream *s, uint32_t space, struct tnt_stream *tuple)` |br|
:codenormal:`ssize_t tnt_select(struct tnt_stream *s, uint32_t space, uint32_t index, uint32_t limit, uint32_t offset, uint8_t iterator, struct tnt_stream *key)` |br|
:codenormal:`ssize_t tnt_update(struct tnt_stream *s, uint32_t space, uint32_t index, struct tnt_stream *key, struct tnt_stream *ops)`
.. _c_get_reply:
......@@ -177,8 +177,8 @@ should be destroyed.
tnt_stream_free(tnt);
Function description: |br|
:codenormal:`tnt_close(struct tnt_stream *s)` |br|
:codenormal:`tnt_stream_free(struct tnt_stream *s)`
:codenormal:`void tnt_close(struct tnt_stream *s)` |br|
:codenormal:`void tnt_stream_free(struct tnt_stream *s)`
The example program only shows one request and does not show all that's
necessary for good practice. For that, see http://github.com/tarantool/tarantool-c.
......
......@@ -22,7 +22,7 @@ check that the server is listening and that examples exists, as :ref:`described
To run the program, say :code:`python example.py`. The program will connect
to the server, will send the request, and will not throw an exception if
all went well. If the tuple already exists, the program will throw
:code:`DatabaseException(“Duplicate key exists in unique index)`.
:code:`tarantool.error.DatabaseError: (3, "Duplicate key exists in unique index 'primary' in space 'examples'")`.
The example program only shows one request and does not show all that's
necessary for good practice. For that, see http://github.com/tarantool/tarantool-python.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment