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.
Throws
INVALID_ARGUMENT if the type name is registered for another enum, or if T is registered under another type name or conventions.
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.
A type name is registered for one enum and an enum under one type name and one pair of conventions; the same enum under the same name with the same conventions again changes nothing.
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.