diff --git a/doc/sphinx/book/app/c_lua_tutorial.rst b/doc/sphinx/book/app/c_lua_tutorial.rst index 67a90ef2bc647495739a7dcd4626a878027ac308..2c9d4398adf3060e8fa99f34e63c5f708e27fcd1 100644 --- a/doc/sphinx/book/app/c_lua_tutorial.rst +++ b/doc/sphinx/book/app/c_lua_tutorial.rst @@ -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 diff --git a/doc/sphinx/book/connectors/__c.rst b/doc/sphinx/book/connectors/__c.rst index f912851e7f18b855e2813089d811c9e972634ee5..51f15658a8455b28b4bb8ae59568b362e58505c0 100644 --- a/doc/sphinx/book/connectors/__c.rst +++ b/doc/sphinx/book/connectors/__c.rst @@ -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. diff --git a/doc/sphinx/book/connectors/__python.rst b/doc/sphinx/book/connectors/__python.rst index 6563c1bb8b140868b4647b312e1ef31459afc62e..e1956385930af65015c2836c5d08005a86ce73a4 100644 --- a/doc/sphinx/book/connectors/__python.rst +++ b/doc/sphinx/book/connectors/__python.rst @@ -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.