@@ -1524,19 +1524,19 @@ defmodule Mongo do
1524
1524
1525
1525
def exec_hello ( conn , opts ) do
1526
1526
with { :ok , _cmd , response } <- DBConnection . execute ( conn , % Query { action: { :exec_hello , [ ] } } , [ ] , opts ) do
1527
- check_for_error ( response , [ hello: 1 ] , opts )
1527
+ check_for_error ( response , :exec_hello , opts )
1528
1528
end
1529
1529
end
1530
1530
1531
1531
def exec_hello ( conn , cmd , opts ) do
1532
1532
with { :ok , _cmd , response } <- DBConnection . execute ( conn , % Query { action: { :exec_hello , cmd } } , [ ] , opts ) do
1533
- check_for_error ( response , cmd , opts )
1533
+ check_for_error ( response , :exec_hello , opts )
1534
1534
end
1535
1535
end
1536
1536
1537
1537
def exec_more_to_come ( conn , opts ) do
1538
1538
with { :ok , _cmd , response } <- DBConnection . execute ( conn , % Query { action: :more_to_come } , [ ] , opts ) do
1539
- check_for_error ( response , [ :more_to_come ] , opts )
1539
+ check_for_error ( response , :more_to_come , opts )
1540
1540
end
1541
1541
end
1542
1542
@@ -1747,12 +1747,16 @@ defmodule Mongo do
1747
1747
do: raise ( ArgumentError , "expected list of documents, got: #{ inspect ( other ) } " )
1748
1748
1749
1749
## support for logging like Ecto
1750
- defp do_log ( [ :more_to_come ] , _duration , _opts ) do
1750
+ defp do_log ( :more_to_come , _duration , _opts ) do
1751
+ :ok
1752
+ end
1753
+
1754
+ defp do_log ( :exec_hello , _duration , _opts ) do
1751
1755
:ok
1752
1756
end
1753
1757
1754
1758
defp do_log ( cmd , duration , opts ) do
1755
- case Keyword . has_key? ( cmd , :isMaster ) || Keyword . has_key? ( cmd , :more_to_come ) || Keyword . has_key? ( cmd , :hello ) do
1759
+ case Keyword . has_key? ( cmd , :isMaster ) do
1756
1760
true ->
1757
1761
:ok
1758
1762
0 commit comments