• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

tarantool / tarantool / 8986426289
88%

Build:
DEFAULT BRANCH: master
Ran 07 May 2024 01:49PM UTC
Jobs 1
Files 513
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

07 May 2024 01:38PM UTC coverage: 87.083% (+0.01%) from 87.073%
8986426289

push

github

sergepetrenko
box: pass source tuple to `default_func` field option of `space:format`

Let's pass the source tuple received as the argument to DML to the
`default_func` field option of `space:format` to give users more
versatility and the opportunity to compute the field value using other
fields from the source tuple.

For the tuple argument, we create a tuple rather than pass a MsgPack
object for consistency with our other box APIs, even though it is
suboptimal in terms of performance.

We create the tuple argument with the empty default format, however, in the
future it is possible to create it with a `names_only=true` format so that
the source tuple can have the space format's data dictionary.

We create the tuple argument from the source tuple data, which implies the
following: (i) fields may not adhere to the space format; (ii) nil fields
are always nil (i.e., the `default` value and the `default_func` are
not used). (i) is because we can only validate the tuple after we finish
building it. (ii) is because trying to use the `default` value and the
`default_func` would have field build ordering ambiguity and would hurt
performance of field building.

Closes #9825

@TarantoolBot document
Title: Tuple argument of `default_func` field option of `space:format`
Product: Tarantool
Since: 3.2
Root documents: https://www.tarantool.io/en/doc/latest/reference/reference_lua/box_space/format/

The source tuple (i.e., the argument of DML) is now passed as a second
argument to the `default_func` field option of `space:format`.

See also tarantool/tarantool#9825 and [PRD](https://www.notion.so/tarantool/Pass-tuple-as-argument-to-field-s-default_func-8785637fb79f43e4b8ca729e75fc4582).

Please note that the tuple argument is created from the source tuple data,
which implies the following: (i) fields may not adhere to the space format;
(ii) nil fields are always nil (i.e., the `default` value and the
`default_func` are not used).

67421 of 119853 branches covered (56.25%)

20 of 21 new or added lines in 5 files covered. (95.24%)

39 existing lines in 14 files now uncovered.

100127 of 114979 relevant lines covered (87.08%)

2473376.9 hits per line

Jobs
ID Job ID Ran Files Coverage
1 8986426289.1 07 May 2024 01:49PM UTC 0
87.08
GitHub Action Run
Source Files on build 8986426289
Detailed source file information is not available for this build.
  • Back to Repo
  • b32b20c6 on github
  • Prev Build on master (#8923228744)
  • Next Build on master (#9078779772)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc