查詢動態欄位

要查詢變數中包含名稱的欄位 ,請使用欄位函式 。

some_field = :id
some_value = 10

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