Skip to content

SQL: document SQL_EXPR functions #3245

@TarantoolBot

Description

@TarantoolBot

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.

Metadata

Metadata

Assignees

Labels

2.112.11 release and the associated technical debtfeatureA new functionalitysql[location] SQL manual

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions