Skip to content

"Array contains element" translation #460

Description

@havotto

According to the documentation array element containment is translated like this:

.Where(c => c.SomeArray.Contains(3))

to

WHERE 3 = ANY("c"."SomeArray")

As I understand this filter cannot use GIN index created on the array column.
So what about changing the translation to:

WHERE "c"."SomeArray" @> ARRAY[3]

or

WHERE "c"."SomeArray" @> '{3}'

There is a difference with NULL element handling though.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions