River
Ur's own SQL style, which right-aligns each clause's keyword along a river.
- Formats
- SQL (when chosen)
- In
ur.toml [format.sql] style = "river"
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 river 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;
Defaults
The shared options, as River 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.
| Option | Default | River calls it |
|---|---|---|
width | 80 | |
indent.width | 4 | |
indent.style | ||
line-ending | "auto" | |
trailing-comma.add | "preserve" | |
trailing-comma.forces-break | false | |
quotes | "preserve" | |
target |
Its own options
Set in a table named for it, such as [format.river], or in a language's table, as river = { ... }.
| Option | Default | What it does |
|---|---|---|
keep_lists | false | Keep a select list's items and a FROM clause's tables on the lines they are written on, rather than one to a line. Takes true or false. |