我想使用' in'像这样的运算符:
array = [{1, "Jean"}, {2, "Marc"}]
from(x in People,
where: fragment("(?, ?)", x.id, x.first_name) in ^array)
|> Repo.all()`
但是当我这样做时,我收到了这个错误:
** (FunctionClauseError) no function clause matching in :lists.zip/2
以下是代码为ecto_tuples_example
的回购您可以运行mix test test/models/people_test.exs
来查看错误。