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

Please add the option to capitalize SQL keywords #357

Closed
odebroqueville opened this issue Sep 2, 2019 · 1 comment
Closed

Please add the option to capitalize SQL keywords #357

odebroqueville opened this issue Sep 2, 2019 · 1 comment
Labels
feature request New issue opened using "Feature request" template formatting

Comments

@odebroqueville
Copy link

Is your feature request related to a problem? Please describe.
I saved the following statement in a query.sql file:
select * from wakanda where alpha = 8 and beta = 9 limit 10;

and then formatted it (btw, cmd+e cmd+b for OS X Mojave didn't do anything!) producing this result:

select
  *
from
  wakanda
where
  alpha = 8
  and beta = 9
limit
  10;

Describe the solution you'd like
I would very much have preferred the following result which I find more readable and compact:

SELECT *
FROM wakanda
WHERE alpha = 8
  AND beta = 9
LIMIT 10;

Describe alternatives you've considered
or at least capitalising the SQL keywords:

SELECT
  *
FROM
  wakanda
WHERE
  alpha = 8
  AND beta = 9
LIMIT
  10;

It would be really nice if you would add support for capitalisation, maybe as a setting.

@odebroqueville odebroqueville added the feature request New issue opened using "Feature request" template label Sep 2, 2019
@mtxr
Copy link
Owner

mtxr commented Sep 2, 2019

Hi @odebroqueville .

Actually keywords already have the option to transform to upper case. Take a look here:

The formatting you suggested is pretty cool. We already have a ticket for that in the formatter project. I'll link it here after work.

Closing since we already have a ticket for this.

@mtxr mtxr closed this as completed Sep 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New issue opened using "Feature request" template formatting
Projects
None yet
Development

No branches or pull requests

2 participants