Skip to content
Snippets Groups Projects
Commit f797eec4 authored by Vladimir Davydov's avatar Vladimir Davydov
Browse files

box: implement persistent sequences

This patch implements a new object type, persistent sequences. Sequences
are created with function box.schema.sequence.create(name, options).
Options include min/max, start value, increment, cache size, just like
in Postgresql, although 'cache' is ignored for now. All sequences can be
accessed via box.sequence.<name>, similarly to spaces. To generate a
sequence value, use seq:next() method. To retrieve the last generated
value, use seq:get(). A sequence value can also be reset to the start
value or to any other value using seq:reset() and seq:set() methods.

Needed for #389
parent 1f736583
No related branches found
No related tags found
No related merge requests found
Showing with 1131 additions and 7 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment