Skip to content

Commit

Permalink
update Ecto.Adapters.SQL.explain/4's typespec (#518)
Browse files Browse the repository at this point in the history
when passing `format :map` option to `explain/4`, it will return json decoded list of maps
  • Loading branch information
fishtreesugar committed May 19, 2023
1 parent 859501d commit 75ec962
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ecto/adapters/sql.ex
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ defmodule Ecto.Adapters.SQL do
"""
@spec explain(pid() | Ecto.Repo.t | Ecto.Adapter.adapter_meta,
:all | :update_all | :delete_all,
Ecto.Queryable.t, opts :: Keyword.t) :: String.t | Exception.t
Ecto.Queryable.t, opts :: Keyword.t) :: String.t | Exception.t | list(map)
def explain(repo, operation, queryable, opts \\ [])

def explain(repo, operation, queryable, opts) when is_atom(repo) or is_pid(repo) do
Expand Down

0 comments on commit 75ec962

Please sign in to comment.