Skip to content

Commit

Permalink
refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
nakagami committed Feb 11, 2019
1 parent 8ffe432 commit 9a72c30
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/firebirdex/query.ex
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,16 @@ defmodule Firebirdex.Query do
params
end

defp convert(v) do
defp convert_value(v) do
v
end

defp convert_row(row) do
row |> Enum.map(fn(x) -> convert(x) end)
Enum.map(row, &(convert_value(&1)))
end

def decode(_query, result, _opts) do
converted = result.rows |> Enum.map(fn(x) -> convert_row(x) end)
%Result{result | rows: converted}
%Result{result | rows: Enum.map(result.rows, &(convert_row(&1)))}
end
end

Expand Down

0 comments on commit 9a72c30

Please sign in to comment.