Open christoph-maurer opened 2 years ago
I'm relying on HotChocolates support for filtering lists. This does not seem to work with PostgreSQL arrays as mapped by Npgsql. Independent of whether you use equalTo
or greaterThanOrEqualTo
, the resulting SQL where clause is WHERE o."NearnormalHemisphericalVisibleTransmittances" @> ARRAY[@__p_0]::double precision[]
. Note that @>
is the contains
operator of PostgreSQL arrays. Three solutions come to mind:
What fun it is to be a software developer working in a heterogeneous software world.
Addition: As far as I can see, when we keep using PostgreSQL arrays, it's not possible to rewrite greaterThanOrEqualTo
and lessThanOrEqualTo
into SQL queries simply because PotgreSQL arrays do not have respective generic containment operators. With generic I mean that the developer cannot decide what containment means, that is, how values are compared with each other. With the built-in containment operators, elements are always compared by equality.
When I search https://www.buildingenvelopedata.org/data/optical for
componentId equalTo "9dffecac-0903-4172-aea4-db8bed9d06b3"
, then I see one data set withNearnormal Hemispherical Visible Transmittances 0.63
.When I search https://www.buildingenvelopedata.org/data/optical for
Nearnormal Hemispherical Visible Transmittances greaterThanOrEqualTo 0.63
, then I see no data sets at all. Why?