sqlformat-rs
sqlformat-rs copied to clipboard
Add option to configure newline after keywords
A query like this:
SELECT * FROM users WHERE id = 1;
gets formatted as:
SELECT
*
FROM
users
WHERE
id = 1;
Would it be possible to configure the formatter to only add newline if there is more than one item following a keyword?
So in another example I'd like to be able to format this:
SELECT * FROM users WHERE id = 1;
SELECT id, name, email, created_at FROM users WHERE id = 1;
into this:
SELECT * FROM users WHERE id = 1;
SELECT
id,
name,
email,
created_at
FROM users WHERE id = 1;
-- or this
SELECT
id,
name,
email,
created_at
FROM users
WHERE id = 1;