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

[FORMATTING] tsql: char datatype is emitted in uppercase when functionCase is specified as upper #811

Closed
rmja opened this issue Dec 20, 2024 · 1 comment
Labels

Comments

@rmja
Copy link

rmja commented Dec 20, 2024

Input data

I run with the option functionCase: "upper" and dataTypeCase: "lower".

CREATE TABLE Test123(
    Col1 Nvarchar(100),
    Col2 Char(100)
)

Expected Output

CREATE TABLE Test123(
    Col1 nvarchar(100),
    Col2 char(100)
)

Actual Output

CREATE TABLE Test123(
    Col1 nvarchar(100),
    Col2 CHAR(100)
)

Usage

  • How are you calling / using the library? prettier-plugin-sql
  • What SQL language(s) does this apply to? tsql
  • Which SQL Formatter version are you using? 15.4.7
@rmja rmja added the bug label Dec 20, 2024
@nene
Copy link
Collaborator

nene commented Dec 21, 2024

Thanks for reporting.

Looks like CHAR was mistakenly included in both function and as data type lists. Well, it might be both in Transact-SQL, but SQL Formatter can only handle one.

@nene nene closed this as completed in badf398 Dec 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants