Add format_object field to spaces
Nobody has claimed this yet.
- Dominant language
- CSS
- Stars
- 15
- Forks
- 49
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 3
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
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.
Assessment
- Tech stack
- lua
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 65/100