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

tarantool / tarantool / 5442505782
88%

Build:
DEFAULT BRANCH: master
Ran 03 Jul 2023 09:04AM UTC
Jobs 1
Files 490
Run time 18s
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

03 Jul 2023 08:51AM UTC coverage: 86.013% (+0.02%) from 85.995%
5442505782

push

github

locker
box: introduce formats for standalone tuples

Introduce `box.tuple.format` object, a Lua wrapper around tuple format:
these objects own a tuple format, which is almost equivalent to
`space:format`, except for check constraints and foreign key constraints
being disabled (though they appear to be present for compatibility with
`space:format`).

Add an option table argument to `box.tuple.new` with 'format' option,
allowing to create formatted spaceless tuples.

Closes #4693

@TarantoolBot document
Title: Formats for standalone tuples and `box_tuple_new_vararg` compat opt

A new box.tuple.format library was added, with a tuple format constructor
(`new`) and a tuple format validator (`is`).

New tuple format objects (userdata) were added, which can be used with the
same format clause as for the `space:format` method (except that check
constraints and foreign keys are disabled for them):
NO_WRAP
```lua
f = box.tuple.format.new(box.space._space:format())
f = box.tuple.format.new{{name = 'field1', type = 'string', is_nullable = true,
                          nullable_action = 'none', collation = 'unicode_uk_s2',
                          default = 'UPPER("string")',
                          constraint = {ck = 'box.schema.user.info'},
                          foreign_key = {fk = {space = '_space', field = 'name'}}},
                          {name = 'field2', nullable_action = 'ignore',
                          foreign_key = {fk = {space = '_space', field = 1}}}}
```
NO_WRAP

Format objects have several introspection methods: `:pairs`, `:ipairs`,
`totable`, and also have a `__serialize` metamethod — these methods return
the original (i.e., user-provided) format clause. `:pairs` is an alias to
`ipairs` (since the format clause is an array by nature), and the `totable`
method is an alias to the `__serialize` metamethod, which returns an array
of field definitions.

Format objects also have a `:tostring` method, which simply returns a
"box.tuple.format" liter... (continued)

63518 of 115822 branches covered (54.84%)

95197 of 110678 relevant lines covered (86.01%)

3127733.17 hits per line

Jobs
ID Job ID Ran Files Coverage
1 5442505782.1 03 Jul 2023 09:04AM UTC 0
86.01
GitHub Action Run
Source Files on build 5442505782
Detailed source file information is not available for this build.
  • Back to Repo
  • dc26e47e on github
  • Prev Build on master (#5421927827)
  • Next Build on master (#5444877339)
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