Skip to content

Add explain and to-sql options to ecto.query#746

Merged
josevalim merged 2 commits into
elixir-ecto:masterfrom
cdvx:add-ecto-query-explain
Jul 24, 2026
Merged

Add explain and to-sql options to ecto.query#746
josevalim merged 2 commits into
elixir-ecto:masterfrom
cdvx:add-ecto-query-explain

Conversation

@cdvx

@cdvx cdvx commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Support printing query plans with --explain and generated SQL with --to-sql
without running the query.

Closes #742

cdvx added 2 commits July 24, 2026 15:45
- add support for printing query plans with --explain
- update --sql flag to --to-sql

Closes elixir-ecto#742.
@josevalim
josevalim merged commit 7908e75 into elixir-ecto:master Jul 24, 2026
10 checks passed
@josevalim

Copy link
Copy Markdown
Member

Beautiful, thank you! 💚 💙 💜 💛 ❤️

The last request is likely a --sql flag where we treat the input as a SQL string instead of Elixir!

@cdvx

cdvx commented Jul 24, 2026

Copy link
Copy Markdown
Contributor Author

Beautiful, thank you! 💚 💙 💜 💛 ❤️

The last request is likely a --sql flag where we treat the input as a SQL string instead of Elixir!

Pleasure is mine! I can pick up the --sql flag update as well, is there an issue for this already?

@josevalim

Copy link
Copy Markdown
Member

Go for it, no issue needed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support --explain in mix ecto.query

2 participants