sqlfmt

Formats
SQL (when chosen)
In ur.toml
[format.sql] style = "sqlfmt"
Its options
https://docs.sqlfmt.com/getting-started/configuring-sqlfmt

Formatted

extents.sql, as written
-- The space each data file uses.
select e.file_id,f.file_name,sum(e.blocks) allocated,f.blocks "FILE SIZE" from dba_extents e join dba_data_files f on e.file_id=f.file_id where f.status='AVAILABLE' group by e.file_id,f.file_name,f.blocks order by e.file_id;
ur format --style sqlfmt extents.sql
-- The space each data file uses.
select e.file_id, f.file_name, sum(e.blocks) allocated, f.blocks "FILE SIZE"
from dba_extents e
join dba_data_files f on e.file_id = f.file_id
where f.status = 'AVAILABLE'
group by e.file_id, f.file_name, f.blocks
order by e.file_id
;

Try it in the playground →

Defaults

The shared options, as sqlfmt sets them when nothing configures it. Its own names for them are read from its configuration files, but ur.toml sets them by the shared name only.

OptionDefaultsqlfmt calls it
width88line_length
max-width
indent.width4
indent.style
line-ending"auto"
trailing-comma.add"preserve"
trailing-comma.forces-breakfalse
quotes"preserve"
target

Its own options

Set in a table named for it, such as [format.sqlfmt], or in a language's table, as sqlfmt = { ... }.

OptionDefaultWhat it does
dialect"polyglot"The SQL dialect sqlfmt reads: polyglot, or clickhouse, which keeps the case of names. Takes "polyglot", "clickhouse".