Skip to content

Thank you — and reusable SQL formatting #20

Description

@halostatue

I’ve implemented something like the formatter bits of ecto_dev_logger in the past, but your approach here was very clean and helped me with an investigation that I was looking for.

I have suggested to the Ecto team that Ecto (SQL) probably should have formatter functions and callbacks to the adapters for the differences as you have implemented, and that your formatter code might be a really good start for this.

If that's rejected, can I suggest extracting the SQL formatter code from ecto_dev_logger into a separate repository/package so that it is usable by others? We’ve written an inspect_sql function that has similar formatting functionality (focused only on PostgreSQL for now), but I think that if the Ecto team doesn’t have any interest in a formatter by default, having a community package focused on formatting would be the next best option.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions