We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hello!
I believe that there is an issue with the --runtime-enums flag.
--runtime-enums
Given this mysql table definition:
CREATE TABLE `campaign_attributes` ( `opt_account_id` varchar(30) NOT NULL, `id` bigint unsigned NOT NULL, `name` varchar(250) DEFAULT NULL, `status` enum('ENABLED','PAUSED','REMOVED','ENABLED_NOT_SERVING','UNKNOWN') NOT NULL, PRIMARY KEY (`opt_account_id`,`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci /*!50100 PARTITION BY KEY (opt_account_id) PARTITIONS 100 */;
And this command:
kysely-codegen --runtime-enums --camel-case --dialect mysql --url 'mysql://db/warehouse?user=user&password=password'
I get the output:
export interface CampaignAttributes { id: number; name: string | null; optAccountId: string; status: "ENABLED" | "ENABLED_NOT_SERVING" | "PAUSED" | "REMOVED" | "UNKNOWN"; }
This is with kysely-codegen@0.15.0.
kysely-codegen@0.15.0
Shouldn't the output be using enums instead of strings for the field status?
status
Thanks for any help :)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hello!
I believe that there is an issue with the
--runtime-enums
flag.Given this mysql table definition:
And this command:
I get the output:
This is with
kysely-codegen@0.15.0
.Shouldn't the output be using enums instead of strings for the field
status
?Thanks for any help :)
Upvote & Fund
The text was updated successfully, but these errors were encountered: