microsoft / azuredatastudio

Azure Data Studio is a data management and development tool with connectivity to popular cloud and on-premises databases. Azure Data Studio supports Windows, macOS, and Linux, with immediate capability to connect to Azure SQL and SQL Server. Browse the extension library for more database support options including MySQL, PostgreSQL, and MongoDB.
https://learn.microsoft.com/sql/azure-data-studio
MIT License
7.58k stars 906 forks source link

Provide an option for camel casing SQL Keywords (aduxr) #4926

Open gengelbms opened 5 years ago

gengelbms commented 5 years ago

Issue Type: Feature Request

You can often create SQL code that vaguely resembles a ransom note. If your style for writing SQL keywords does not match what the upper case style used by code completion. Code completion writes SQL keywords in all upper case (SELECT), but users write these keywords in all lower case (select), title case (Select), or camel case (OpenRowset).

Let users choose how they want their SQL keywords written.

image

Azure Data Studio version: Azure Data Studio 1.5.2 (f74080c96310354bc92211f1826c0fdce78ca2f6, 2019-03-22T06:09:10.602Z) OS version: Darwin x64 18.5.0

kburtram commented 5 years ago

@gengelbms there is an setting named Mssql > Format: Keyword Casing that controls this behavior. Currently we only support UPPERCASE and lowercase but the other options seem reasonable as well.

gengelbms commented 5 years ago

Thank you. Most of the participants I've seen seem to prefer lowercase, so having the setting is great. I have seen several camel-case user, so that option would be nice have. I would guess that current settings give us about 90% coverage.

kazinad commented 5 years ago

@gengelbms there is an setting named Mssql > Format: Keyword Casing that controls this behavior. Currently we only support UPPERCASE and lowercase but the other options seem reasonable as well.

I changed this setting to lowercase, but the code completion list still provides me only uppercase items even after restarting the application.

kburtram commented 5 years ago

@kazinad are you using Postgres extension? This option is currently only supported for MSSQL.

kazinad commented 5 years ago

@kazinad are you using Postgres extension? This option is currently only supported for MSSQL.

Yes I use MSSQL, but there are 3 options related to casing in settings, and I changed possibly the wrong one. Thx