-
Is there a way for fetching all enums from the database for populating a selectField ? |
Beta Was this translation helpful? Give feedback.
Answered by
s0kil
Jun 30, 2021
Replies: 1 comment 1 reply
-
I have a ENUM defined as: CREATE TYPE brokerage_subscription_type AS ENUM ('basic_subscription', 'bronze_subscription', 'silver_subscription', 'gold_subscription'); To get a list of all the ENUM values: subscriptionTypes :: [BrokerageSubscriptionType] <- sqlQueryScalar "SELECT enum_range(NULL::brokerage_subscription_type)" () |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
s0kil
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have a ENUM defined as:
To get a list of all the ENUM values: