(Ecto.Query.CompileError) any(l.signers) is not a valid query expression.
(from l in Listing, where: "[email protected]" == any(l.signers))
|> Repo.all()
CodePudding user response:
Ecto.Query.API.in/2 is supposed to be used to cover postgresql ANY selector.
where: mail_addr in l.signers
It is assumed that l.signers is an enumerable.
CodePudding user response:
select id,address,owners from listings where '[email protected]' = ANY(signers);
This qurty is work in postgresql.
