Loading…
None
New source string testing_project / Documentation: reference/reference_lua/key_def — English |
Glossary
| English | English | ||
|---|---|---|---|
| No related strings found in the glossary. | |||
Loading…
None
New source string testing_project / Documentation: reference/reference_lua/key_def — English |
| English | English | ||
|---|---|---|---|
| No related strings found in the glossary. | |||
-- 1, 99.5, 'X', nil, 99.5
-- and the fields that we care about are
-- #3 (a string) and #1 (an integer).
-- We can define those fields with k = key_def.new
-- and extract the values with k:extract_key.
tarantool> key_def = require('key_def')
---
...
tarantool> k = key_def.new({{type = 'string', fieldno = 3},
> {type = 'unsigned', fieldno = 1}})
---
...
tarantool> k:extract_key({1, 99.5, 'X', nil, 99.5})
---
- ['X', 1]
...