Tarantool development patches archive
 help / color / mirror / Atom feed
From: Konstantin Osipov <kostja@tarantool.org>
To: tarantool-patches@freelists.org
Cc: alexander.turenko@tarantool.org,
	Kirill Shcherbatov <kshcherbatov@tarantool.org>
Subject: [tarantool-patches] Re: [PATCH v1 1/1] lua: export key_def methods for LUA key_def object
Date: Tue, 23 Apr 2019 18:05:30 +0300	[thread overview]
Message-ID: <20190423150530.GB5668@chai> (raw)
In-Reply-To: <a70a542e29daaf19d1163539b0e192689135ffb0.1553516687.git.kshcherbatov@tarantool.org>

* Kirill Shcherbatov <kshcherbatov@tarantool.org> [19/03/25 15:29]:
> Functions extract_key, compare, compare_with_key, merge defined
> for key_def introduced for LUA key_def object.
> 
> Close #4025
> 
> @TarantoolBot document
> Title: Built-in methods for key_def object
> Now it is possible to work with index base object - key
> definition in LUA. Available methods:
> key = key_def:extract_key(tuple)
> key_def:compare(tuple_a, tuple_b)
> key_def:compare_with_key(tuple, key), where key is tuple or table
> new_key_def = key_def:merge(second_key_def)

The API mostly looks good to me. I hesitated a bit about
extract_key() building a tuple, not returning a raw msgpack
pointer and part count, like C api, but then I erred on the side
of safety.

-- 
Konstantin Osipov, Moscow, Russia, +7 903 626 22 32
http://tarantool.io - www.twitter.com/kostja_osipov

      parent reply	other threads:[~2019-04-23 15:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-25 12:27 [tarantool-patches] " Kirill Shcherbatov
2019-03-26  1:46 ` [tarantool-patches] " Alexander Turenko
2019-03-26 13:37   ` Kirill Shcherbatov
2019-03-26 22:54     ` Alexander Turenko
2019-04-23 15:06       ` Konstantin Osipov
2019-04-23 15:09         ` Kirill Shcherbatov
2019-04-23 15:05 ` Konstantin Osipov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190423150530.GB5668@chai \
    --to=kostja@tarantool.org \
    --cc=alexander.turenko@tarantool.org \
    --cc=kshcherbatov@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --subject='[tarantool-patches] Re: [PATCH v1 1/1] lua: export key_def methods for LUA key_def object' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox