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

Convert datatype #68

Closed
wants to merge 2 commits into from
Closed

Conversation

Cheban1996
Copy link

@Cheban1996 Cheban1996 commented Oct 11, 2023

Add converter for datatype

src/extension.ts Outdated
@@ -31,6 +31,9 @@ export function getFormattedText(
if (config.keywordCase != null) {
formattingOptions.keywordCase = CaseOptionEnum[<keyof typeof CaseOptionEnum>config.keywordCase];
}
if (config.datatypeCase != null) {
formattingOptions.keywordCase = CaseOptionEnum[<keyof typeof CaseOptionEnum>config.datatypeCase];
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have to tried it with this change? I doubt it would work since you're just overriding the keywordCase option, which passes --keyword-case to pgFormatter. But, it looks like you want --data-type option to be passed.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah you right. Need use type-case

-U | --type-case N    : Change the case of the data type name. Default is
                                lowercase: 1. Values: 0=>unchanged, 1=>lowercase,
                                2=>uppercase, 3=>capitalize.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry i undestand what you mean
You use psqlformat(https://github.com/bradymholt/psqlformat) but in that lib not defined type-case

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

Copy link
Author

@Cheban1996 Cheban1996 Oct 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe do you can provide?

Copy link
Owner

@bradymholt bradymholt Oct 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe I can provide what?

Copy link
Author

@Cheban1996 Cheban1996 Oct 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bradymholt
Copy link
Owner

Closing in lieu of #69

@bradymholt bradymholt closed this Oct 11, 2023
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

Successfully merging this pull request may close these issues.

2 participants