Enumerate enums? #28
Unanswered
martinstreicher
asked this question in
Q&A
Replies: 1 comment 2 replies
-
It looks like this code (https://github.com/alassek/activerecord-pg_enum/blob/main/lib/active_record/pg_enum/6.1/postgresql_adapter.rb) runs a query to get the enums. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Let's say I define an enum in PG using something like this...
... or I use your gem to define the list of legiitimate values.
Is there a way, akin to
columns_hash
and other inspection methods onconnection
to:a. Find all the enumerated types defined in the DB?
b. For each enumerated type, find all the legitimate values defined?
Beta Was this translation helpful? Give feedback.
All reactions