Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[2pt] Document return_raw net.box option #2506

Closed
Tracked by #2588
TarantoolBot opened this issue Dec 20, 2021 · 0 comments · Fixed by #2739
Closed
Tracked by #2588

[2pt] Document return_raw net.box option #2506

TarantoolBot opened this issue Dec 20, 2021 · 0 comments · Fixed by #2739
Assignees
Labels
feature A new functionality reference [location] Tarantool manual, Reference part server [area] Task relates to Tarantool's server (core) functionality

Comments

@TarantoolBot
Copy link
Collaborator

TarantoolBot commented Dec 20, 2021

Document return_raw net.box option.

Product: Tarantool
Since: 2.10.0-beta2
Root document: https://www.tarantool.io/en/doc/latest/reference/reference_lua/net_box/
SME: @ locker
Peer reviewer: @

Details

If the return_raw flag is set, net.box will return response data
wrapped in a msgpack object (see msgpack.object()) instead of decoding
it to Lua. This can be useful when a response is supposed to be passed
through without decoding or with partial decoding - creating a msgpack
object can reduce pressure on the Lua garbage collector in this case.

Example:

local c = require('net.box').connect(uri)
local mp = c.eval('eval ...', {1, 2, 3}, {return_raw = true})
mp:decode() -- {1, 2, 3}

The option is ignored for methods that return nil (begin, commit,
rollback, upsert, prepare will return nil even if return_raw is
set) and for index.count (it returns a number). For execute, the
option is applied only to data (rows) while metadata is decoded
irrespective of the value of return_raw.
Requested by @locker in tarantool/tarantool@4423456.

@xuniq xuniq added this to the Estimate [@xuniq] milestone Jan 10, 2022
@xuniq xuniq changed the title Document return_raw net.box option [3pt] Document return_raw net.box option Jan 10, 2022
@xuniq xuniq added feature A new functionality reference [location] Tarantool manual, Reference part server [area] Task relates to Tarantool's server (core) functionality labels Jan 10, 2022
@xuniq xuniq modified the milestones: Estimate [@xuniq], net.box Jan 12, 2022
@veod32 veod32 changed the title [3pt] Document return_raw net.box option [2pt] Document return_raw net.box option Jan 24, 2022
@veod32 veod32 changed the title [2pt] Document return_raw net.box option [3pt] Document return_raw net.box option Jan 24, 2022
@veod32 veod32 changed the title [3pt] Document return_raw net.box option [2pt] Document return_raw net.box option Jan 24, 2022
@veod32 veod32 removed this from the net.box milestone Jan 24, 2022
@veod32 veod32 removed their assignment Jan 27, 2022
@veod32 veod32 added the 2sp label Jan 27, 2022
xuniq added a commit that referenced this issue Mar 9, 2022
Fixes #2506
Co-authored-by: Patience Daur <patiencedaur@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A new functionality reference [location] Tarantool manual, Reference part server [area] Task relates to Tarantool's server (core) functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants