Closed
Description
Describe the Feature
I would like to add the datatypes keywords for Snowflake so that they become upper or lower case when the formatting option is choosen.
Why do you want this feature?
This is a common practice to have the upper case data types across the industry.
I have created the code locally, but don't have the permissions to push it to Github. Hence, adding the code here:
In snowflake.keywords.ts at line 100
datatypes: [
'NUMBER',
'DECIMAL',
'NUMERIC',
'INT',
'INTEGER',
'BIGINT',
'SMALLINT',
'TINYINT',
'BYTEINT',
'FLOAT',
'FLOAT4',
'FLOAT8',
'DOUBLE',
'DOUBLE PRECISION',
'REAL',
'VARCHAR',
'CHAR',
'CHARACTER',
'STRING',
'TEXT',
'BINARY',
'VARBINARY',
'BOOLEAN',
'DATE',
'DATETIME',
'TIME',
'TIMESTAMP',
'TIMESTAMP_LTZ',
'TIMESTAMP_NTZ',
'TIMESTAMP',
'TIMESTAMP_TZ',
'VARIANT',
'OBJECT',
'ARRAY',
'GEOGRAPHY',
'GEOMETRY',
],
In snowflake.test.ts line 109
it('formats CREATE TABLE', () => {
expect(
format(
`CREATE TABLE t (foo stRing COMMENT 'blah', abc numBer (38, 0) COMMENT 'testing number with length more');`, {
keywordCase: 'upper',
}
)
).toBe(dedent`
CREATE TABLE
t (
foo STRING COMMENT 'blah',
abc NUMBER (38, 0) COMMENT 'testing number with length more'
);`);
});
Once done, please refresh the VS Code extension as well.