As underlined here, there are cases where = ANY(array) does not behave the same as = ANY(subquery), so it may be useful to explicitly convert a subquery into an array.
This PR allows doing this.
It adds support for:
Constructing an array from a subselect with array(subselect)
Using outputs of array(...) in .eq_any(...) and .ne_all(...) expressions
It's technically a breaking change, but only to the extent to which people implemented the AsExpressionList trait manually, or wrote new query fragments that use this as bound, which seems unlikely enough that this can probably be released. (That's only a marker trait for usage of array(...) in its current somewhat-limited version.)
As underlined here, there are cases where
= ANY(array)
does not behave the same as= ANY(subquery)
, so it may be useful to explicitly convert a subquery into an array.This PR allows doing this.
It adds support for:
array(subselect)
array(...)
in.eq_any(...)
and.ne_all(...)
expressionsIt's technically a breaking change, but only to the extent to which people implemented the
AsExpressionList
trait manually, or wrote new query fragments that use this as bound, which seems unlikely enough that this can probably be released. (That's only a marker trait for usage ofarray(...)
in its current somewhat-limited version.)