Skip to content

Commit

Permalink
Merge pull request elixir-mongo#8 from AlexKovalevych/fix-logging
Browse files Browse the repository at this point in the history
Fix logging
  • Loading branch information
ankhers committed Jan 23, 2017
2 parents b6bd734 + 2259ec4 commit 6ed4a28
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/mongo_ecto/connection.ex
Original file line number Diff line number Diff line change
Expand Up @@ -237,12 +237,18 @@ defmodule Mongo.Ecto.Connection do
["REPLACE", format_part("coll", coll), format_part("filter", filter),
format_part("document", doc)]
end
defp format_query(%Query{action: :find_rest, extra: coll}, [cursor]) do
defp format_query(%Query{action: :get_more, extra: coll}, [cursor]) do
["GET_MORE", format_part("coll", coll), format_part("cursor_id", cursor)]
end
defp format_query(%Query{action: :get_more, extra: coll}, []) do
["GET_MORE", format_part("coll", coll), format_part("cursor_id", "")]
end
defp format_query(%Query{action: :kill_cursors, extra: coll}, [cursors]) do
["KILL_CURSORS", format_part("cursor_ids", cursors)]
end
defp format_query(%Query{action: :kill_cursors, extra: coll}, []) do
["KILL_CURSORS", format_part("cursor_ids", "")]
end

defp format_part(name, value) do
[" ", name, "=" | inspect(value)]
Expand Down

0 comments on commit 6ed4a28

Please sign in to comment.