sqlfmt: A SQL formatter for writing prettier SQL
sqlfmt is an online SQL formatter that aims to beautifully format SQL statements by understanding all CockroachDB syntax, attempting to use available horizontal space in the best way possible, and maintaining visual alignment regardless of editor configuration. It was designed with a focus on using available space efficiently and adapting to the complexity of the query. The tool is based on a paper describing an algorithm for efficient document layout with multiple possible layouts, initially implemented in Haskell and later converted into Go. sqlfmt is not highly customizable and aims to remove options over time as it evolves.
Company
Cockroach Labs
Date published
Jan. 20, 2022
Author(s)
Matt Jibson
Word count
1721
Language
English
Hacker News points
207