Ecto显示已解析的查询但不显示搜索结果

时间:2016-12-29 14:37:54

标签: postgresql elixir ecto

以下是使用Ecto搜索数据库记录时的结果:

jxxmbp:lookup carlson$ ./lookup --title foo

02:55:19.029 [debug] QUERY OK source="notes" db=2.3ms decode=2.2ms queue=45.1ms
SELECT n0."id", n0."title", n0."content" FROM "notes" AS n0 WHERE (n0."title" = $1) ["foo"]

但是我希望找到记录,而不是真相。

以下是相关代码:

def process({:title, arg}) do
    Lookup.Note |> Ecto.Query.where(title: ^arg) |> Lookup.Repo.all
  end

0 个答案:

没有答案
相关问题