Implement a new version of select() API
This patch introduces backward-incompatible changes to select() and adds couple new methods: * index:select(key) -> tuple, tuple, ... was changed to index:select(key, opts = {}) -> { tuple } where opts can be - iterator = ALL if key == nil or key == {} | EQ otherwse - offset = 0 - limit = unlimited * index:get(key) -> tuple | nil | error on more than one tuple a wrapper for select() to get the single tuple * space:put(tuple) -> tuple an alias for space:replace() (to provide integrity with get()) Test suite, box.space and box.net.box API were also updated to meet changes.
Showing
- src/box/index.h 4 additions, 3 deletionssrc/box/index.h
- src/box/lua/box_net.lua 55 additions, 3 deletionssrc/box/lua/box_net.lua
- src/box/lua/call.cc 12 additions, 6 deletionssrc/box/lua/call.cc
- src/box/lua/misc.lua 1 addition, 1 deletionsrc/box/lua/misc.lua
- src/box/lua/schema.lua 49 additions, 9 deletionssrc/box/lua/schema.lua
- src/box/request.cc 8 additions, 2 deletionssrc/box/request.cc
- src/box/request.h 1 addition, 0 deletionssrc/box/request.h
- test/big/hash.result 70 additions, 70 deletionstest/big/hash.result
- test/big/hash.test.lua 70 additions, 70 deletionstest/big/hash.test.lua
- test/big/hash_multipart.result 8 additions, 8 deletionstest/big/hash_multipart.result
- test/big/hash_multipart.test.lua 8 additions, 8 deletionstest/big/hash_multipart.test.lua
- test/big/lua.result 11 additions, 10 deletionstest/big/lua.result
- test/big/lua.test.lua 7 additions, 7 deletionstest/big/lua.test.lua
- test/big/lua/push.lua 1 addition, 1 deletiontest/big/lua/push.lua
- test/big/sql.result 10 additions, 9 deletionstest/big/sql.result
- test/big/sql.test.py 1 addition, 1 deletiontest/big/sql.test.py
- test/big/tree_pk.result 52 additions, 43 deletionstest/big/tree_pk.result
- test/big/tree_pk.test.lua 21 additions, 21 deletionstest/big/tree_pk.test.lua
- test/big/tree_pk_multipart.result 91 additions, 91 deletionstest/big/tree_pk_multipart.result
- test/big/tree_pk_multipart.test.lua 30 additions, 30 deletionstest/big/tree_pk_multipart.test.lua
Loading
Please register or sign in to comment