-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
This issue is related to this: ExoQuery/terpal-sql#21
Currently I convert enums to a String (usually with .name) before I interpolate then into an SQL String with Terpal.
It would be nice this plugins accepts enum values (of enums annotated with @serializable).
Simply taking their .name as the value (overridden with their @SerialName, if provided).
Looking at the code this would probably require kotlinx.serialization as a dependency of this plugin: not sure if that's acceptable.
Maybe using this could also make interpolating lists less boilerplate-y (${Params.list(...)}.
Alternatively a Param function could also be used to interpolate Kotlin enums (but I do not see how to do that without kotlinx.serialization or reflection).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels