Skip to content

key_def length introspection #4275

Closed
@TarantoolBot

Description

@TarantoolBot

Related dev. issue(s): tarantool/tarantool#10111

Product: Tarantool
Since: 3.2
Root document: https://www.tarantool.io/en/doc/latest/reference/reference_lua/key_def/
SME: @ unera

Details

To check key_def length (parts count) there is a standard lua operator
# (__len metamethod).

Example:

function is_full_pkey(space, key)
    return #space.index[0].parts == #key
end

Requested by @ unera in tarantool/tarantool@90f3304.

Metadata

Metadata

Assignees

Labels

3.2reference[location] Tarantool manual, Reference part

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions