Skip to content

Add format_object field to spaces #5135

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
TarantoolBot opened this issue May 27, 2025 · 0 comments
Open

Add format_object field to spaces #5135

TarantoolBot opened this issue May 27, 2025 · 0 comments
Labels
3.5 feature A new functionality reference [location] Tarantool manual, Reference part

Comments

@TarantoolBot
Copy link
Collaborator

TarantoolBot commented May 27, 2025

Related dev. issue(s): tarantool/tarantool@cf1c250

Product: Tarantool
Since: 3.5
Root document: https://www.tarantool.io/en/doc/latest/reference/reference_lua/box_space/
SME: @ locker

Details

Since: 3.5

The format_object field returns the box.tuple.format object associated
with the space’s format. It provides the same API as box.tuple.format,
including :validate() and other.

Example:

space = box.schema.space.create('test', {
    format = {
        {name = 'id', type = 'unsigned'},
        {name = 'name', type = 'string'}
    }
})

space.format_object:validate({123, 'example'})

TW Guidelines

It is suggested that a new page on the same level with https://www.tarantool.io/en/doc/latest/reference/reference_lua/box_space/format/ is to be created.

Hint: the existing method space_object:format() returns a table, the new format_object field returns an object

Do together with #5134

@AArdeev AArdeev changed the title Add format_object field to spaces Add format_object method to spaces May 30, 2025
@AArdeev AArdeev added this to the Estimate [@aardeev] milestone May 30, 2025
@AArdeev AArdeev changed the title Add format_object method to spaces Add format_object field to spaces May 30, 2025
@AArdeev AArdeev removed their assignment May 30, 2025
@AArdeev AArdeev removed the doc_gap label Jun 5, 2025
@veod32 veod32 added reference [location] Tarantool manual, Reference part doc_gap feature A new functionality and removed doc_gap labels Jun 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.5 feature A new functionality reference [location] Tarantool manual, Reference part
Projects
None yet
Development

No branches or pull requests

3 participants