Skip to content

Fetching nested structures in tuple fields #120

@AnaNek

Description

@AnaNek

What about "bad input" tests? What if user specified some bad field name?

I believe that we should do as Tarantool does:

tarantool> box.tuple.new({1, {a = {b = 'c'}}})
---
- [1, {'a': {'b': 'c'}}]
...

tarantool> box.tuple.new({1, {a = {b = 'c'}}})['[1]']
---
- 1
...

tarantool> box.tuple.new({1, {a = {b = 'c'}}})['[2]']
---
- {'a': {'b': 'c'}}
...

tarantool> box.tuple.new({1, {a = {b = 'c'}}})['[2].a.b']
---
- c
...
tarantool> box.tuple.new({1, {a = {b = 'c'}}})['K']
---
- null
...

This makes this feature quite powerful and allows to fetch not only some tuple fields but some nested structures in tuple fields.

Originally posted by @olegrok in #118 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions