From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp33.i.mail.ru (smtp33.i.mail.ru [94.100.177.93]) (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 9CBA2469719 for ; Tue, 17 Mar 2020 23:40:46 +0300 (MSK) Date: Tue, 17 Mar 2020 20:40:45 +0000 From: Nikita Pettik Message-ID: <20200317204045.GB4294@tarantool.org> References: <5905e1da-c4a6-6d9b-d17c-a2dbe1d14033@tarantool.org> <20200317143159.60241-1-olegrok@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200317143159.60241-1-olegrok@tarantool.org> Subject: Re: [Tarantool-patches] [PATCH v3] box: allow to retrieve the last generated value of 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 On 17 Mar 17:31, olegrok@tarantool.org wrote: > From: Oleg Babin > > This patch introduces "current" function for sequences. > It returns the last retrieved value of specified sequence or > throws an error if no value has been generated yet. > > This patch partially reverts 3ff1f1e36e14381c0ebb5862943d4da281254767 > (box: remove sequence_get) here similar function "get" was removed > to avoid possible misleading with "currval" function of PosgreSQL > that returns the last obtained value of the sequence in the scope > of current session. In contrast "current" returns the last globally > retrieved value of the sequence. > > Closes #4752 > > @TarantoolBot document > Title: sequence:current() > > This patch introduces "current" function for sequences. > It returns the last retrieved value of specified sequence or > throws an error if no value has been generated yet ("next" > has not been called yet or right after "reset" is called). LGTM. Please, provide @Changelog and I will push it. Thanks.