Torus.QueryInspector (Torus v0.2.1)
View SourceHelpers to debug your SQL queries. You can this module both while creating the queries and directly in your running production shell once deployed, so that the explain analyze returns more accurate results.
Summary
Functions
Runs explain analyze on the query and prints it to the console. Returns the query.
Converts the query to SQL and prints it to the console. Returns the query.
Substitutes the parameters in the query and prints the SQL to the console. Returns the query. The SQL is in its raw form and can be directly executed by postgres.
Functions
@spec tap_explain_analyze(Ecto.Query.t(), Ecto.Repo, :all | :update_all | :delete_all) :: Ecto.Query.t()
Runs explain analyze on the query and prints it to the console. Returns the query.
Runs the query!
@spec tap_sql(Ecto.Query.t(), Ecto.Repo, :all | :update_all | :delete_all) :: Ecto.Query.t()
Converts the query to SQL and prints it to the console. Returns the query.
Substitutes the parameters in the query and prints the SQL to the console. Returns the query. The SQL is in its raw form and can be directly executed by postgres.