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
Most databases support having a comment field for each columns. We could extract the comment, and output it to the definition file.
comment
Example:
This schema
CREATE TABLE `customer_metrics` ( `company_id` bigint unsigned NOT NULL, `date` date NOT NULL, `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `customer_email` text, `remote_customer_id` varchar(255) NOT NULL, `mrr` decimal(16,4) DEFAULT NULL COMMENT 'Monthly Recurring Revenue in USD', `ltv` decimal(16,4) DEFAULT NULL COMMENT 'Lifetime Value in USD', PRIMARY KEY (`company_id`,`date`), KEY `customer_metrics_date` (`date`), KEY `customer_metrics_company_id` (`company_id`), KEY `customer_metrics_remote_customer_id` (`remote_customer_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
would output this:
export interface CustomerMetrics { company_id: number customer_email: string | null date: Date /** * Lifetime Value in USD */ ltv: Decimal | null /** * Monthly Recuring Revenue in USD */ mrr: Decimal | null remote_customer_id: string updated_at: Generated<Date> }
which would enable this:
The text was updated successfully, but these errors were encountered:
This is a great idea! This should definitely be added.
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Most databases support having a
comment
field for each columns. We could extract the comment, and output it to the definition file.Example:
This schema
would output this:
which would enable this:
Upvote & Fund
The text was updated successfully, but these errors were encountered: