You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CREATE TABLE
users (
id INTEGERPRIMARY KEY GENERATED ALWAYS AS IDENTITY,
username VARCHAR(30) NOT NULL UNIQUE,
password_hash VARCHAR(60) NOT NULL
);
It would be nice to have an option (eg. dataTypeCase, could default to keywordCase value for backwards compatibility) to format the data types (integer, varchar, any other data types) as lowercase, since this is the style in the PostgreSQL docs:
CREATE TABLE
users (
id integerPRIMARY KEY GENERATED ALWAYS AS IDENTITY,
username varchar(30) NOT NULL UNIQUE,
password_hash varchar(60) NOT NULL
);
Yeah, makes sense. Especially as some SQL dialects treat data type names as keywords and others do not. Also, this would alleviate a general problem with the formatter not understanding the context where a keyword is used.
an option keywordCaseIgnore (array), which would allow for more flexible customization (would not allow for same configurability, I prefer option 1)
constoptions={language: 'postgresql',keywordCase: 'upper',keywordCaseIgnore: [// Avoid changing case of `name` fields in tables'name',// Avoid changing case of data types'varchar','integer',// ...],}
Describe the Feature
Currently, using
keywordCase: 'upper'
results inIt would be nice to have an option (eg.
dataTypeCase
, could default tokeywordCase
value for backwards compatibility) to format the data types (integer
,varchar
, any other data types) as lowercase, since this is the style in the PostgreSQL docs:Why do you want this feature?
This is the style in the PostgreSQL docs.
The text was updated successfully, but these errors were encountered: