box: export registered functions in box.func folder
Needed for #4182, #1260 @TarantoolBot document Title: Export registered functions to box.func folder Now all registered with box.schema.func.create functions are exported in box.func folder. Each function have :call and :drop method. The :drop method just a shortcut for box.schema.func.drop interface. The :call method is similar to net.box connection:call method and allows to call a registered function directly. All access checks are performed on each function call. Example: function sum(a, b) return a + b end box.schema.func.create('sum') box.func.sum --- - language: LUA setuid: false name: sum id: 2 ... box.func.sum:call({1, 3}) --- - 4 ... box.func.sum:drop()
Showing
- src/box/alter.cc 2 additions, 0 deletionssrc/box/alter.cc
- src/box/lua/call.c 219 additions, 26 deletionssrc/box/lua/call.c
- src/box/lua/init.c 1 addition, 0 deletionssrc/box/lua/init.c
- src/box/lua/misc.cc 4 additions, 4 deletionssrc/box/lua/misc.cc
- src/box/lua/schema.lua 29 additions, 0 deletionssrc/box/lua/schema.lua
- src/box/port.h 0 additions, 2 deletionssrc/box/port.h
- src/box/schema.cc 1 addition, 0 deletionssrc/box/schema.cc
- src/box/schema.h 5 additions, 0 deletionssrc/box/schema.h
- test/box/function1.c 33 additions, 0 deletionstest/box/function1.c
- test/box/function1.result 215 additions, 0 deletionstest/box/function1.result
- test/box/function1.test.lua 69 additions, 0 deletionstest/box/function1.test.lua
- test/box/misc.result 1 addition, 0 deletionstest/box/misc.result
Loading
Please register or sign in to comment