From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 5D3232A855 for ; Wed, 27 Mar 2019 10:29:31 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Vie80MiZMepV for ; Wed, 27 Mar 2019 10:29:31 -0400 (EDT) Received: from smtp41.i.mail.ru (smtp41.i.mail.ru [94.100.177.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 191312A840 for ; Wed, 27 Mar 2019 10:29:31 -0400 (EDT) From: Kirill Shcherbatov Subject: [tarantool-patches] [PATCH v2 0/2] lua: add key_def lua module Date: Wed, 27 Mar 2019 17:29:26 +0300 Message-Id: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-Help: List-Unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-Subscribe: List-Owner: List-post: List-Archive: To: tarantool-patches@freelists.org, alexander.turenko@tarantool.org Cc: Kirill Shcherbatov Introduced new LUA module key_def. There are several reasons to add this module: * Factor out key parts parsing code from the tuples merger (#3276). * Support comparing a tuple with a key / a tuple, support merging key_defs from Lua (#3398). * Support extracting a key from a tuple (#4025). Changes in version 2: - ability to pass tables, not only tuples as arguments - perform types and nullablility validations - fixed errors http://github.com/tarantool/tarantool/tree/kshch/gh-4025-lua-key-kef-methods https://github.com/tarantool/tarantool/issues/4025 Alexander Turenko (1): lua: add luaT_tuple_new() Kirill Shcherbatov (1): lua: add key_def lua module src/CMakeLists.txt | 1 + src/box/CMakeLists.txt | 2 + src/box/lua/init.c | 5 + src/box/lua/key_def.c | 441 ++++++++++++++++++++++++++++++++ src/box/lua/key_def.h | 63 +++++ src/box/lua/key_def.lua | 19 ++ src/box/lua/space.cc | 35 +-- src/box/lua/tuple.c | 58 +++-- src/box/lua/tuple.h | 15 +- src/box/tuple.h | 33 +++ test/box-tap/key_def.test.lua | 340 ++++++++++++++++++++++++ test/unit/CMakeLists.txt | 4 + test/unit/luaT_tuple_new.c | 178 +++++++++++++ test/unit/luaT_tuple_new.result | 22 ++ 14 files changed, 1167 insertions(+), 49 deletions(-) create mode 100644 src/box/lua/key_def.c create mode 100644 src/box/lua/key_def.h create mode 100644 src/box/lua/key_def.lua create mode 100755 test/box-tap/key_def.test.lua create mode 100644 test/unit/luaT_tuple_new.c create mode 100644 test/unit/luaT_tuple_new.result -- 2.21.0