[PATCH v5 04/12] box: introduce tuple_format_add_key_part
Vladimir Davydov
vdavydov.dev at gmail.com
Mon Nov 19 20:50:29 MSK 2018
On Mon, Oct 29, 2018 at 09:56:36AM +0300, Kirill Shcherbatov wrote:
> Introduced a new tuple_format_add_key_part that makes format
> initialization for specified key_part and configuration.
> This decrease tuple_format_create routine complexity and would
> be used to initialize structures in format for JSON path.
>
> Need for #1012
> ---
> src/box/tuple_format.c | 153 ++++++++++++++++++++++++++-----------------------
> 1 file changed, 82 insertions(+), 71 deletions(-)
>
> diff --git a/src/box/tuple_format.c b/src/box/tuple_format.c
> index 6f76158..088579c 100644
> --- a/src/box/tuple_format.c
> +++ b/src/box/tuple_format.c
> @@ -43,6 +43,84 @@ static const struct tuple_field tuple_field_default = {
> ON_CONFLICT_ACTION_DEFAULT, NULL, COLL_NONE,
> };
>
> +static int
> +tuple_format_add_key_part(struct tuple_format *format,
> + const struct field_def *fields, uint32_t field_count,
> + const struct key_part *part, bool is_sequential,
> + int *current_slot)
Pushed to 2.1.
Note, tuple_format_add_key_part was renamed to tuple_format_use_key_part
in the latest version.
More information about the Tarantool-patches
mailing list