Skip to content

Commit f2e15f4

Browse files
crud: explicitly convert select options that can be tuples to tables
In scope of tarantool/tarantool#8147, box tuples returned from remote procedure calls our now encoded as a new extension, `MP_TUPLE`, and, as, the results of such calls are now decoded as box tuples, i.e., cdata. For compatibility with this feature, we need to explicitly convert tuple fields of select options, which are returned from a remote procedure calls, to tables. Needed for tarantool/tarantool#8147
1 parent 9409b6f commit f2e15f4

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1313

1414
### Fixed
1515
* Compatibility with Tarantool 3.0 binary protocol change (#390).
16+
* Compatibility with Tarantool 3.0 tuple objects (#390).
1617

1718
## [1.4.0] - 16-10-23
1819

crud/select.lua

+9
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,15 @@ function checkers.vshard_call_mode(p)
3030
end
3131

3232
local function select_on_storage(space_name, index_id, conditions, opts)
33+
-- For compatibility with IPROTO_CALL_RET_TUPLE_EXTENSION feature.
34+
if opts ~= nil then
35+
if box.tuple.is(opts.scan_value) then
36+
opts.scan_value = opts.scan_value:totable()
37+
end
38+
if box.tuple.is(opts.after_tuple) then
39+
opts.after_tuple = opts.after_tuple:totable()
40+
end
41+
end
3342
dev_checks('string', 'number', '?table', {
3443
scan_value = 'table',
3544
after_tuple = '?table',

0 commit comments

Comments
 (0)