Tarantool development patches archive
 help / color / mirror / Atom feed
From: Konstantin Osipov <kostja@tarantool.org>
To: tarantool-patches@freelists.org
Cc: vdavydov.dev@gmail.com, Kirill Shcherbatov <kshcherbatov@tarantool.org>
Subject: Re: [tarantool-patches] [PATCH v1 3/3] box: extend box.schema.func with persistent folder
Date: Tue, 14 May 2019 21:24:53 +0300	[thread overview]
Message-ID: <20190514182453.GB3801@atlas> (raw)
In-Reply-To: <cff964252be76c5d7e39e04f3c133683a482d582.1557839195.git.kshcherbatov@tarantool.org>

* Kirill Shcherbatov <kshcherbatov@tarantool.org> [19/05/14 16:31]:
> Now all persistent Lua functions are available with
> box.schema.func.persistent table.

> lua_code = [[function(a, b) return a + b end]]
> box.schema.func.create('sum', {lua_code = lua_code})
> box.schema.func.persistent.sum

> ---
> - call: 'function: 0x4014b7f8'
>   name: sum
>   id: 2
> ...
Why do we need this?  I would not do it unless there is a request. 
A function in Lua is a first class object, anyone could make it
from the text stored in the system table. What's the point of
making it for the user?

A useful information would be, for procedures at least, the count
and types of function arguments. But it is even better if we make
this information available right in the system space, not in Lua.

Please keep in mind two things:

- Lua is just one  language among others, SQL is the other. 
- the feature should work at the core level, e.g. system spaces,
  and Lua level is just sugar wrapping around the core.
  

-- 
Konstantin Osipov, Moscow, Russia, +7 903 626 22 32

      reply	other threads:[~2019-05-14 18:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-14 13:29 [PATCH v1 0/3] box: persistent Lua functions Kirill Shcherbatov
2019-05-14 13:29 ` [PATCH v1 1/3] box: refactor box_lua_find helper Kirill Shcherbatov
2019-05-17 12:33   ` [tarantool-patches] " Kirill Shcherbatov
2019-05-14 13:29 ` [PATCH v1 2/3] schema: extend _func space to persist lua functions Kirill Shcherbatov
2019-05-14 18:21   ` [tarantool-patches] " Konstantin Osipov
2019-05-17 12:33     ` [tarantool-patches] " Kirill Shcherbatov
2019-05-17 15:29       ` Konstantin Osipov
2019-05-14 13:29 ` [PATCH v1 3/3] box: extend box.schema.func with persistent folder Kirill Shcherbatov
2019-05-14 18:24   ` 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=20190514182453.GB3801@atlas \
    --to=kostja@tarantool.org \
    --cc=kshcherbatov@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --cc=vdavydov.dev@gmail.com \
    --subject='Re: [tarantool-patches] [PATCH v1 3/3] box: extend box.schema.func with persistent folder' \
    /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