[Tarantool-patches] [PATCH 2.X v4 1/4] module api: export box_tuple_validate
Vladislav Shpilevoy
v.shpilevoy at tarantool.org
Fri Oct 16 01:03:09 MSK 2020
Hi! Thanks for the patch!
> diff --git a/src/box/tuple.h b/src/box/tuple.h
> index 53ae690cc..755aee506 100644
> --- a/src/box/tuple.h
> +++ b/src/box/tuple.h
> @@ -283,6 +283,17 @@ box_tuple_update(box_tuple_t *tuple, const char *expr, const char *expr_end);
> box_tuple_t *
> box_tuple_upsert(box_tuple_t *tuple, const char *expr, const char *expr_end);
>
> +/**
> + * Check tuple data correspondence to the space format.
> + * @param tuple Tuple to validate.
> + * @param format Format to which the tuple must match.
> + *
> + * @retval 0 The tuple is valid.
> + * @retval -1 The tuple is invalid.
The public functions should say in their comments if they
set a diag in case of an error. Here and in the other patches.
I didn't say it earlier, because didn't think of it. Realized
it today.
> + */
> +int
> +box_tuple_validate(box_tuple_t *tuple, box_tuple_format_t *format);
More information about the Tarantool-patches
mailing list