tarantool / tarantool/doc

SQL_EXPR functions as default values

Open
#3,837 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature sql
Dominant language
CSS
Stars
15
Forks
49
Avg merge
1d 13h
Merged PRs (30d)
3

Description

Product: Tarantool
Since: 3.0
Root document: https://www.tarantool.io/en/doc/latest/reference/reference_lua/box_schema/func_create/#lua-data.function_options.language
SME: @ ImeevMA

Details

SQL_EXPR functions can now be set as default values. Note that all
arguments to the SQL_EXPR functions will be replaced by the space field
'default' value. This only matters for the SQL_EXPR used as default from
Lua, since in SQL it is not allowed to have arguments in the default
expression.
Requested by @ImeevMA in https://github.com/tarantool/tarantool/commit/695e9b4b1094731e2a64980653e237c312d5206c.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open the root document at the SQL function language options section and read the surrounding default-value guidance. Document that SQL_EXPR functions can be used as defaults, including how arguments are replaced for Lua-defined defaults and the SQL restriction. Done when the behavior and its Lua-versus-SQL distinction are clear in that reference page.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua, sql
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.