Hello,
I can't find a way to define an enum with Crecto.
PostgreSQL type:
CREATE TYPE enum_lang AS ENUM('en', 'fr');
The column:
enum_field :enum_lang, Langs, column_name: "lang", column_type: String
Enum:
Error:
Unhandled exception: PG::ResultSet#read returned a Slice(UInt8). A (String | Nil) was expected. (Exception)
If i naively replace String by Slice(Uint8), an error occurred because Slice(Uint8) is not a supported type in Crecto.
Please, how am I supposed to handle this enum?
Hello,
I can't find a way to define an enum with Crecto.
PostgreSQL type:
The column:
Enum:
Error:
If i naively replace
StringbySlice(Uint8), an error occurred becauseSlice(Uint8)is not a supported type in Crecto.Please, how am I supposed to handle this enum?