tarantool / tarantool/doc

`<schema object>:map()` now supports transforming composite types

Open
#4,970 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

<schema object>:map() now calls the user-provided transformation
function not only on scalar schema nodes, but also on record, map
and array nodes. The function is called on the outmost node first,
then on the descandant ones.

<schema object>:apply_default() now supports the default annotation
(and the apply_default_if one) for composite types. Similarly to
:map() it traverses the nodes in the pre-order way.
Requested by @Totktonada in https://github.com/tarantool/tarantool/commit/d1208ea3de5d7fe12630fd08d0c2b7f65fc9ca5e.

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.

Research direction

The issue names :map() and :apply_default() as the entry points; begin by locating their API documentation and compare it with the stated traversal and annotation behavior. Update the relevant documentation to cover composite record, map, and array nodes, preorder traversal, and default/apply_default_if; done when those behaviors are accurately documented.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.