Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Be consistent with the spacing after reserved keywords #73

Open
lu-zero opened this issue Jan 15, 2025 · 1 comment
Open

Be consistent with the spacing after reserved keywords #73

lu-zero opened this issue Jan 15, 2025 · 1 comment

Comments

@lu-zero
Copy link
Contributor

lu-zero commented Jan 15, 2025

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.

@lu-zero
Copy link
Contributor Author

lu-zero commented Feb 20, 2025

In general we are producing different outputs depending on the whitespaces in the input, we should tackle it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant