Skip to content

Commit 2259ec4

Browse files
fix get_more action logging
1 parent e2a351c commit 2259ec4

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

lib/mongo_ecto/connection.ex

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,9 +237,12 @@ defmodule Mongo.Ecto.Connection do
237237
["REPLACE", format_part("coll", coll), format_part("filter", filter),
238238
format_part("document", doc)]
239239
end
240-
defp format_query(%Query{action: :find_rest, extra: coll}, [cursor]) do
240+
defp format_query(%Query{action: :get_more, extra: coll}, [cursor]) do
241241
["GET_MORE", format_part("coll", coll), format_part("cursor_id", cursor)]
242242
end
243+
defp format_query(%Query{action: :get_more, extra: coll}, []) do
244+
["GET_MORE", format_part("coll", coll), format_part("cursor_id", "")]
245+
end
243246
defp format_query(%Query{action: :kill_cursors, extra: coll}, [cursors]) do
244247
["KILL_CURSORS", format_part("cursor_ids", cursors)]
245248
end

0 commit comments

Comments
 (0)