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

tarantool / tarantool / 5278224273
88%

Build:
DEFAULT BRANCH: master
Ran 15 Jun 2023 11:37AM UTC
Jobs 1
Files 488
Run time 15s
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

15 Jun 2023 11:27AM UTC coverage: 85.914% (+0.005%) from 85.909%
5278224273

push

github

locker
box: support default field values in the space format

Now a field can be assigned a default value in the space format. When a new
tuple is inserted into a space, and some of the fields contain null values,
those fields will be filled with their respective default values.

Closes #8157

@TarantoolBot document
Title: Document default field values
Product: Tarantool
Since: 3.0
Root document: https://www.tarantool.io/en/doc/latest/reference/reference_lua/box_space/format/

The format clause contains, for each field, a definition within braces:
`{name='...',type='...'[,is_nullable=...][,default=...]}`, where:

* the optional `default` value contains a default value for the field.
  Its type must be compatible with the field type. If default value is set,
  it is applied regardless of whether `is_nullable` is true or false.

Example:

```lua
tarantool> box.space.tester:format{
         > {name = 'id', type = 'unsigned'},
         > {name = 'name', type = 'string', default = 'Noname'},
         > {name = 'pass', type = 'string'},
         > {name = 'shell', type = 'string', default = '/bin/sh'}}
---
...

tarantool> box.space.tester:insert{1000, nil, 'qwerty'}
---
- [1000, 'Noname', 'qwerty', '/bin/sh']
...
```

63306 of 115807 branches covered (54.67%)

116 of 116 new or added lines in 6 files covered. (100.0%)

94973 of 110544 relevant lines covered (85.91%)

2881271.46 hits per line

Jobs
ID Job ID Ran Files Coverage
1 5278224273.1 15 Jun 2023 11:37AM UTC 0
85.91
GitHub Action Run
Source Files on build 5278224273
Detailed source file information is not available for this build.
  • Back to Repo
  • 7da5f06d on github
  • Prev Build on master (#5276304508)
  • Next Build on master (#5279917508)
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