Closed mariandaniel24 closed 1 month ago
Hello, in regard to the implementation of runtime enums in #115 , I believe there is a bug with the generated keys. So, given this SQL
CREATE TYPE risk_evaluation_status AS ENUM ('OK', 'CAN_USE', 'SHOULD_NOT_BE_USED');
When I generate types using kysely-codegen --camel-case --runtime-enums --dialect=postgres --out-file=generated/db-types.ts:
kysely-codegen --camel-case --runtime-enums --dialect=postgres --out-file=generated/db-types.ts
The output is:
// It generates this export enum RiskEvaluationStatus { CANUSE = 'CAN_USE', OK = 'OK', SHOULDNOTBEUSED = 'SHOULD_NOT_BE_USED', } // It should actually generate export enum RiskEvaluationStatus { CAN_USE = 'CAN_USE', OK = 'OK', SHOULD_NOT_BE_USED = 'SHOULD_NOT_BE_USED', }
Encountering the same issue.
Same here. If it's not intended, I'll hopefully create a PR.
Should be released in kysely-codegen@0.16.0! 🚀
Thanks @RobinBlomberg
Hello, in regard to the implementation of runtime enums in #115 , I believe there is a bug with the generated keys. So, given this SQL
When I generate types using
kysely-codegen --camel-case --runtime-enums --dialect=postgres --out-file=generated/db-types.ts
:The output is:
Upvote & Fund