Skip to content
Snippets Groups Projects
Commit 90f33049 authored by Dmitry Oboukhov's avatar Dmitry Oboukhov Committed by Vladimir Davydov
Browse files

key_def: Introduce `__len` metamethod

The metamethod is a way to key_def length introspection.

Closes #10111

@TarantoolBot document
Title: key_def length introspection

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

Example:

```lua
function is_full_pkey(space, key)
    return #space.index[0].parts == #key
end
```
parent bde28f0f
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment