-
Notifications
You must be signed in to change notification settings - Fork 43
Description
Product: Tarantool
Since: 2.11
Root document: https://www.tarantool.io/en/doc/latest/reference/reference_lua/box_schema/func_create/
https://www.tarantool.io/en/doc/latest/reference/reference_lua/box_sql/
https://www.tarantool.io/en/doc/latest/reference/reference_sql/sql_statements_and_clauses/
https://www.tarantool.io/en/doc/latest/reference/reference_sql/sql_plus_lua/#calling-lua-routines-from-sql
SME: @ ImeevMA
Details
Now it is possible to create functions with SQL_EXPR language. The
body field of the function definition is the SQL expression.
Currently, these functions can only be used as constraints on tuples and
fields, as there is no interface to define argument names and types
otherwise.
If the SQL_EXPR function is set as a constraint on a field, the function
will throw a validation error if more than one variable is used in the
function. However, the variable name of the only variable will only be
checked if the SQL_EXPR function was created as a field constraint from
SQL.
Requested by @ImeevMA in tarantool/tarantool@1e09901.