Repository navigation
feat(erd): enum values on enum columns, a domain's base type (#1280) - #1292
Merged
Merged
Conversation
PostgreSQL: the catalog query lists an enum type's labels from pg_enum in
their order (also when a domain wraps the enum) and a domain's base type.
MySQL: the labels are read from the column type enum('a','b'), quotes
unescaped. An enum column gets an EN marker; its row tooltip lists the values
(at most 12, then '+N more') and a domain says 'Domain over <base>'. MCP
describe_table reports enum_values.
Checked on the live types_showcase database through MCP: user_role_enum and
order_status_enum list their labels, positive_int and valid_email their base
types.
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Part of the ERD epic (#1286). An enum column showed only the type name; its values are what the reader needs.
pg_enum, in their order, also when a domain wraps the enum, and a domain's base type (format_type(typbasetype)).enum('a','b'), with''unescaped.ENmarker on enum columns; the row tooltip lists the values (12 at most, then+N more), and a domain saysDomain over integer.describe_tablereportsenum_values.Checked on the live
types_showcasedatabase through MCP:user_role_enum→admin, editor, viewer, guest,order_status_enum→ six labels in order,positive_int→integer,valid_email→text.Tests: PG labels and order, MySQL parsing with quotes and commas, domains, plain columns untouched, the PG query asks
pg_enumand the domain base.Closes #1280
Test plan