From d45b34629b0dddfb7cb6a90435568a7e8bcf37ba Mon Sep 17 00:00:00 2001 From: Kseniia Antonova Date: Mon, 1 Mar 2021 02:22:21 +0300 Subject: [PATCH 1/2] fixes gh-1751 fix typos in connecting from your favorite language --- doc/getting_started/getting_started_go.rst | 2 +- doc/getting_started/getting_started_php.rst | 2 +- doc/getting_started/getting_started_python.rst | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/getting_started/getting_started_go.rst b/doc/getting_started/getting_started_go.rst index 09d6be5bef..80f8070e39 100644 --- a/doc/getting_started/getting_started_go.rst +++ b/doc/getting_started/getting_started_go.rst @@ -176,7 +176,7 @@ to ``Update``, but creates a new tuple if the old one was not found. resp, err = conn.Upsert("tester", []interface{}{4, "Another band", 2000}, []interface{}{[]interface{}{"+", 2, 5}}) -This increases by 5 the value of the third field in the tuple with ``id`` = 4, -- or +This increases by 5 the value of the third field in the tuple with ``id`` = 4 or inserts the tuple ``(4, "Another band", 2000)`` if a tuple with this ``id`` doesn't exist. diff --git a/doc/getting_started/getting_started_php.rst b/doc/getting_started/getting_started_php.rst index 698851d691..ddd48702e3 100644 --- a/doc/getting_started/getting_started_php.rst +++ b/doc/getting_started/getting_started_php.rst @@ -196,7 +196,7 @@ to ``update``, but creates a new tuple if the old one was not found. $tester->upsert([4, 'Another band', 2000], Operations::add(2, 5)); -This increases by 5 the value of field ``2`` in the tuple with ``id`` = 4, -- or +This increases by 5 the value of field ``2`` in the tuple with ``id`` = 4 or inserts the tuple ``(4, "Another band", 2000)`` if a tuple with this ``id`` doesn't exist. diff --git a/doc/getting_started/getting_started_python.rst b/doc/getting_started/getting_started_python.rst index 543913f991..1c075d37b1 100644 --- a/doc/getting_started/getting_started_python.rst +++ b/doc/getting_started/getting_started_python.rst @@ -173,7 +173,7 @@ to ``update``, but creates a new tuple if the old one was not found. >>> tester.upsert((4, 'Another band', 2000), [('+', 2, 5)]) -This increases by 5 the value of field ``2`` in the tuple with ``id`` = 4, -- or +This increases by 5 the value of field ``2`` in the tuple with ``id`` = 4 or inserts the tuple ``(4, "Another band", 2000)`` if a tuple with this ``id`` doesn't exist. From 5dfb237db8fc76e2aa77ad057005504abafa860f Mon Sep 17 00:00:00 2001 From: Kseniia Antonova Date: Mon, 1 Mar 2021 16:27:42 +0300 Subject: [PATCH 2/2] fixes gh-1751 fix formatting --- doc/getting_started/getting_started_go.rst | 6 +++--- doc/getting_started/getting_started_php.rst | 4 ++-- doc/getting_started/getting_started_python.rst | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/doc/getting_started/getting_started_go.rst b/doc/getting_started/getting_started_go.rst index 80f8070e39..e8983d57b6 100644 --- a/doc/getting_started/getting_started_go.rst +++ b/doc/getting_started/getting_started_go.rst @@ -130,7 +130,7 @@ To select a tuple from a space, use resp, err = conn.Select("tester", "primary", 0, 1, tarantool.IterEq, []interface{}{4}) -This selects a tuple by the primary key with ``offset`` = 0 and ``limit`` = 1 +This selects a tuple by the primary key with ``offset = 0`` and ``limit = 1`` from a space named ``tester`` (in our example, this is the index named ``primary``, based on the ``id`` field of each tuple). @@ -158,7 +158,7 @@ Update a field value using ``Update``: resp, err = conn.Update("tester", "primary", []interface{}{4}, []interface{}{[]interface{}{"+", 2, 3}}) -This increases by 3 the value of field ``2`` in the tuple with ``id`` = 4. +This increases by 3 the value of field ``2`` in the tuple with ``id = 4``. If a tuple with this ``id`` doesn't exist, Tarantool will return an error. Now use ``Replace`` to totally replace the tuple that matches the @@ -176,7 +176,7 @@ to ``Update``, but creates a new tuple if the old one was not found. resp, err = conn.Upsert("tester", []interface{}{4, "Another band", 2000}, []interface{}{[]interface{}{"+", 2, 5}}) -This increases by 5 the value of the third field in the tuple with ``id`` = 4 or +This increases by 5 the value of the third field in the tuple with ``id = 4``, or inserts the tuple ``(4, "Another band", 2000)`` if a tuple with this ``id`` doesn't exist. diff --git a/doc/getting_started/getting_started_php.rst b/doc/getting_started/getting_started_php.rst index ddd48702e3..6c96e87f09 100644 --- a/doc/getting_started/getting_started_php.rst +++ b/doc/getting_started/getting_started_php.rst @@ -176,7 +176,7 @@ Update a field value using ``update``: $result = $tester->update([4], Operations::set(1, 'New group')->andAdd(2, 2)); This updates the value of field ``1`` and increases the value of field ``2`` -in the tuple with ``id`` = 4. If a tuple with this ``id`` doesn't exist, +in the tuple with ``id = 4``. If a tuple with this ``id`` doesn't exist, Tarantool will return an error. Now use ``replace`` to totally replace the tuple that matches the @@ -196,7 +196,7 @@ to ``update``, but creates a new tuple if the old one was not found. $tester->upsert([4, 'Another band', 2000], Operations::add(2, 5)); -This increases by 5 the value of field ``2`` in the tuple with ``id`` = 4 or +This increases by 5 the value of field ``2`` in the tuple with ``id = 4``, or inserts the tuple ``(4, "Another band", 2000)`` if a tuple with this ``id`` doesn't exist. diff --git a/doc/getting_started/getting_started_python.rst b/doc/getting_started/getting_started_python.rst index 1c075d37b1..a343ab075c 100644 --- a/doc/getting_started/getting_started_python.rst +++ b/doc/getting_started/getting_started_python.rst @@ -155,7 +155,7 @@ Update a field value using ``update``: >>> tester.update(4, [('=', 1, 'New group'), ('+', 2, 2)]) This updates the value of field ``1`` and increases the value of field ``2`` -in the tuple with ``id`` = 4. If a tuple with this ``id`` doesn't exist, +in the tuple with ``id = 4``. If a tuple with this ``id`` doesn't exist, Tarantool will return an error. Now use ``replace`` to totally replace the tuple that matches the @@ -173,7 +173,7 @@ to ``update``, but creates a new tuple if the old one was not found. >>> tester.upsert((4, 'Another band', 2000), [('+', 2, 5)]) -This increases by 5 the value of field ``2`` in the tuple with ``id`` = 4 or +This increases by 5 the value of field ``2`` in the tuple with ``id = 4``, or inserts the tuple ``(4, "Another band", 2000)`` if a tuple with this ``id`` doesn't exist.