We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
#
1 parent f7deeb8 commit 02599f6Copy full SHA for 02599f6
doc/reference/reference_lua/key_def.rst
@@ -38,6 +38,15 @@ to extract or compare the index key values.
38
39
Example: ``key_def.new({{type = 'string', collation = 'unicode', field = 2}})``
40
41
+ You can use the standard lua operator ``#`` (__len metamethod) to check the ``key_def`` length (parts count).
42
+
43
+ **Example**
44
45
+ .. code-block:: lua
46
47
+ function is_full_pkey(space, key)
48
+ return #space.index[0].parts == #key
49
+ end
50
51
.. _key_def-object:
52
0 commit comments