fn jsonb_build_array(args: impl Row, ctx: &Context) -> Result<JsonbVal>
Expand description
Builds a possibly-heterogeneously-typed JSON array out of a variadic argument list.
Each argument is converted as per to_jsonb
.
ยงExamples
query T
select jsonb_build_array(1, 2, 'foo', 4, 5);
----
[1, 2, "foo", 4, 5]
query T
select jsonb_build_array(variadic array[1, 2, 4, 5]);
----
[1, 2, 4, 5]