Closed JasonShin closed 3 weeks ago
Context So far sqlx-ts wasn't able to generate enum types from DB - instead it has generated an any type. With this PR, sqlx-ts will be able to generate enum types, but it will generate all possible enum values as an union of strings
e.g.
export type UsersQueryParams = []; export interface IUsersQueryResult { enum1: 'x-small' | 'small' | 'medium' | 'large' | 'x-large'; }; export interface IUsersQueryQuery { params: UsersQueryParams; result: IUsersQueryResult; };
Context So far sqlx-ts wasn't able to generate enum types from DB - instead it has generated an any type. With this PR, sqlx-ts will be able to generate enum types, but it will generate all possible enum values as an union of strings
e.g.