Ecto displays parsed query but not search results

57 Views Asked by At

Here is what I get when I search for a database record using 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"]

but I want the records found, not the equery.

Here is the relevant code:

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

There are 0 best solutions below