Skip to content

Commit

Permalink
Fix Invalid Syntax in Documentation (#402)
Browse files Browse the repository at this point in the history
The current example gives the following error:

```
** (FunctionClauseError) no function clause matching in Postgrex.DefaultTypes.encode_params/3    
    
    The following arguments were given to Postgrex.DefaultTypes.encode_params/3:
    
        # 1
        "SET lock_timeout TO '10s'"
    
        # 2
        []
    
        # 3
        []
    
    Attempted function clauses (showing 3 out of 3):
    
        defp encode_params([param | params], [type | types], encoded)
        defp encode_params([], [], encoded)
        defp encode_params(params, _, _) when is_list(params)
```
  • Loading branch information
thiagopromano authored May 10, 2022
1 parent 65b1c65 commit 9150163
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ecto/migration.ex
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ defmodule Ecto.Migration do
use Ecto.Migration
def after_begin() do
repo().query! "SET lock_timeout TO '5s'", "SET lock_timeout TO '10s'"
repo().query! "SET lock_timeout TO '5s'"
end
end
end
Expand Down

0 comments on commit 9150163

Please sign in to comment.