fn array_prepend(
left: Option<ScalarRefImpl<'_>>,
right: Option<ListRef<'_>>,
ctx: &Context,
) -> ListValue
Expand description
Prepends a value as the front element of an array. The behavior is the same as PG.
Examples:
query T
select array_prepend(123, array[66]);
----
{123,66}
query T
select array_prepend(null::int, array[66]);
----
{NULL,66}
query T
select array_prepend(233, null::int[]);
----
{233}
query T
select array_prepend(null::int, null::int[]);
----
{NULL}