Add format_object field to spaces

Open Beginner friendly
#5,135 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
65/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Stale
Tech stack
lua
Domain
documentation

Research direction

Start with the existing box_space/format/ page and the box.tuple.format API described in the issue. Create a new page at the same documentation level explaining space.format_object, its object API including :validate(), and the distinction from space:format(); include the provided example as the completion check.

Written by the indexing model from the issue text.

Description

3.5 feature reference

Related dev. issue(s): https://github.com/tarantool/tarantool/commit/cf1c250eb1af25d29cd93509af653479428c5fed

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

Dominant language
CSS
Stars
15
Forks
49
Avg merge
1d 13h
Merged PRs (30d)
3

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from tarantool/doc

All issues in tarantool/doc

Similar issues

More Documentation issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.