查询动态字段

要查询变量中包含名称的字段 ,请使用字段函数 。

some_field = :id
some_value = 10

from p in Post, where: field(p, ^some_field) == ^some_value