sqlformat-rs
sqlformat-rs copied to clipboard
Be consistent with the spacing after reserved keywords
From the tests
"
INSERT INTO some_table (id_product, id_shop, id_currency, id_country, id_registration) (
SELECT IF(dq.id_discounter_shopping = 2, dq.value, dq.value / 100),
IF (dq.id_discounter_shopping = 2, 'amount', 'percentage') FROM foo);"
"
INSERT INTO
some_table (
id_product,
id_shop,
id_currency,
id_country,
id_registration
) (
SELECT
IF(
dq.id_discounter_shopping = 2,
dq.value,
dq.value / 100
),
IF (
dq.id_discounter_shopping = 2,
'amount',
'percentage'
)
FROM
foo
);"
The two IF have different spacing, would be better to either have 1 space always or none always.