Ecto - Postgres - concatenate two columns in the where clause?

Hi there,

Is there anyway I can do this in ecto?

select address1, address2, city from addresses where address1 || address2 ilike '%111 tarpley street, michigan%'

I tried the following but it doesn’t work

where: ilike(address1 <> address2, ^wildcard_search)

You can use a fragment.

Your example should translate roughly to

where: ilike(fragment("address1 || address2"), ^wildcard_search)

That works.

Thank you!