From: Nikita Pettik <korablev@tarantool.org>
To: olegrok@tarantool.org
Cc: Oleg Babin <babinoleg@mail.ru>,
tarantool-patches@dev.tarantool.org, v.shpilevoy@tarantool.org
Subject: Re: [Tarantool-patches] [PATCH 2/2] box: introduce "current" for sequence
Date: Fri, 6 Mar 2020 13:00:50 +0000 [thread overview]
Message-ID: <20200306130050.GC12214@tarantool.org> (raw)
In-Reply-To: <dd357243382b6dcd82245d7ecfcaf9eda9d5deb6.1583494653.git.babinoleg@mail.ru>
On 06 Mar 14:46, olegrok@tarantool.org wrote:
> From: Oleg Babin <babinoleg@mail.ru>
>
> diff --git a/test/box/sequence.test.lua b/test/box/sequence.test.lua
> index 8e00571e5..54011225e 100644
> --- a/test/box/sequence.test.lua
> +++ b/test/box/sequence.test.lua
> @@ -780,3 +780,15 @@ pk = s:create_index('pk', {sequence = true})
> t = box.space._space_sequence:get({s.id})
> box.space._space_sequence:update({s.id}, {{'=', 2, t[2]}})
> s:drop()
> +
> +--
> +-- gh-4752 current value of sequence
> +--
Nit: please, write a bit more informative comments. For instance:
--
-- gh-4752: introduce sequence:current() method which
-- fetches current sequence value but doesn't modify
-- sequence itself.
--
> +sq = box.schema.sequence.create('test')
> +sq:current()
> +sq:next()
> +sq:current()
> +sq:set(42)
> +sq:current()
> +sq:current()
> +sq:drop()
> --
> 2.23.0
>
prev parent reply other threads:[~2020-03-06 13:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-06 11:46 [Tarantool-patches] [PATCH 0/2] Introcude sequence.current olegrok
2020-03-06 11:46 ` [Tarantool-patches] [PATCH 1/2] box: introduce internal sequence error olegrok
2020-03-06 12:55 ` Nikita Pettik
2020-03-06 16:37 ` Oleg Babin
2020-03-06 11:46 ` [Tarantool-patches] [PATCH 2/2] box: introduce "current" for sequence olegrok
2020-03-06 13:00 ` Nikita Pettik [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200306130050.GC12214@tarantool.org \
--to=korablev@tarantool.org \
--cc=babinoleg@mail.ru \
--cc=olegrok@tarantool.org \
--cc=tarantool-patches@dev.tarantool.org \
--cc=v.shpilevoy@tarantool.org \
--subject='Re: [Tarantool-patches] [PATCH 2/2] box: introduce "current" for sequence' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox