From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp40.i.mail.ru (smtp40.i.mail.ru [94.100.177.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 0904C469719 for ; Fri, 6 Mar 2020 16:00:51 +0300 (MSK) Date: Fri, 6 Mar 2020 13:00:50 +0000 From: Nikita Pettik Message-ID: <20200306130050.GC12214@tarantool.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Subject: Re: [Tarantool-patches] [PATCH 2/2] box: introduce "current" for sequence List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: olegrok@tarantool.org Cc: Oleg Babin , tarantool-patches@dev.tarantool.org, v.shpilevoy@tarantool.org On 06 Mar 14:46, olegrok@tarantool.org wrote: > From: Oleg Babin > > 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 >