[Tarantool-patches] [PATCH v3] box: allow to retrieve the last generated value of sequence

Nikita Pettik korablev at tarantool.org
Tue Mar 17 23:40:45 MSK 2020


On 17 Mar 17:31, olegrok at tarantool.org wrote:
> From: Oleg Babin <babinoleg at mail.ru>
> 
> 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.



More information about the Tarantool-patches mailing list