Skip to content

Add format_object field to spaces #5135

Open
@TarantoolBot

Description

@TarantoolBot

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.5featureA new functionalityreference[location] Tarantool manual, Reference part

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions