You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If set for a Lua function, the functions arguments will be passed
wrapped in a msgpack object (see msgpack.object()) when the function
is called over IPROTO or by box.func.NAME:call():
localmsgpack=require('msgpack')
localmy_func=function(mp)
assert(msgpack.is_object(mp))
localargs=mp:decode() -- array of argumentsend
Using this option might improve performance in case a function forwards
most of its arguments to another instance or writes them to a database,
because it eliminates msgpack decoding in Lua.
Requested by @locker in tarantool/tarantool@d2a0124
Additional comment by @ locker:
The option can be used in any custom function registered in box.schema. If such a function is called via net.box (conn:call) or box.func.call, arguments will be passed wrapped in a msgpack object.
The text was updated successfully, but these errors were encountered:
veod32
changed the title
Document that takes_raw_args function option
[3pt] Document the new "takes_raw_args" function option
Jan 13, 2022
veod32
added
server
[area] Task relates to Tarantool's server (core) functionality
reference
[location] Tarantool manual, Reference part
feature
A new functionality
labels
Jan 13, 2022
Uh oh!
There was an error while loading. Please reload this page.
Product: Tarantool
Since: 2.10.0-beta2
Root document:
SME: @ locker
Details
A new function option was added -
takes_raw_args
:If set for a Lua function, the functions arguments will be passed
wrapped in a msgpack object (see
msgpack.object()
) when the functionis called over IPROTO or by
box.func.NAME:call()
:Using this option might improve performance in case a function forwards
most of its arguments to another instance or writes them to a database,
because it eliminates msgpack decoding in Lua.
Requested by @locker in tarantool/tarantool@d2a0124
Additional comment by @ locker:
The option can be used in any custom function registered in
box.schema
. If such a function is called vianet.box
(conn:call) orbox.func.call
, arguments will be passed wrapped in a msgpack object.The text was updated successfully, but these errors were encountered: