schema: rework index sequence API
Rather than passing 'sequence_part' along with 'sequence' on index create/alter, pass a table with the following fields: - id: sequence id or name - field: auto increment field id or name or path in case of json index If id is omitted, the sequence will be auto-generated (equivalent to 'sequence = true'). If field is omitted, the first indexed field is used. Old format, i.e. passing false/true or sequence name/id instead of a table is still supported. Follow-up #4009
Showing
- src/box/alter.cc 67 additions, 19 deletionssrc/box/alter.cc
- src/box/bootstrap.snap 0 additions, 0 deletionssrc/box/bootstrap.snap
- src/box/lua/schema.lua 198 additions, 108 deletionssrc/box/lua/schema.lua
- src/box/lua/space.cc 10 additions, 2 deletionssrc/box/lua/space.cc
- src/box/lua/upgrade.lua 16 additions, 5 deletionssrc/box/lua/upgrade.lua
- src/box/request.c 6 additions, 6 deletionssrc/box/request.c
- src/box/schema_def.h 2 additions, 1 deletionsrc/box/schema_def.h
- src/box/space.h 4 additions, 5 deletionssrc/box/space.h
- src/box/sql/build.c 26 additions, 10 deletionssrc/box/sql/build.c
- src/box/sql/insert.c 2 additions, 4 deletionssrc/box/sql/insert.c
- test/box-py/bootstrap.result 1 addition, 1 deletiontest/box-py/bootstrap.result
- test/box/access.result 9 additions, 0 deletionstest/box/access.result
- test/box/access.test.lua 3 additions, 0 deletionstest/box/access.test.lua
- test/box/access_misc.result 1 addition, 1 deletiontest/box/access_misc.result
- test/box/alter.result 4 additions, 4 deletionstest/box/alter.result
- test/box/sequence.result 132 additions, 44 deletionstest/box/sequence.result
- test/box/sequence.test.lua 55 additions, 25 deletionstest/box/sequence.test.lua
- test/box/stat.result 6 additions, 6 deletionstest/box/stat.result
- test/replication/autobootstrap.result 6 additions, 0 deletionstest/replication/autobootstrap.result
- test/replication/autobootstrap.test.lua 2 additions, 0 deletionstest/replication/autobootstrap.test.lua
Loading
Please register or sign in to comment