registerEnum
Registers an enum type, creating both parameter and result converters.
Parameters
Optional custom type name in the database.
Optional schema where the enum is defined.
The naming convention used for enum values in PostgreSQL.
The naming convention used for enum values in Kotlin.
Type Parameters
The Kotlin enum class.
Registers an enum type, creating both parameter and result converters.
Takes a plain KClass rather than one bound to Enum<T>, because the callers that reach this overload rather than the reified one are holding a class they found - a classpath scan, a configuration file - and cannot name its type. The bound bought them nothing but a cast at every call site; being an enum is checked here instead, once, and reported as the bad argument it is.
Parameters
The Kotlin enum class.
Optional custom type name in the database.
Optional schema where the enum is defined.
The naming convention used for enum values in PostgreSQL.
The naming convention used for enum values in Kotlin.
Throws
INVALID_ARGUMENT if enumClass is not an enum class.