Registration

internal class Registration<T : Any>(val name: String, val kClass: KClass<T>, serializer: KSerializer<T>, val json: EnumAwareJson, val strategy: DynamicWriteStrategy)

One class registered as a dynamic_dto, with the terms of the client that registered it: its values are written on strategy and through json whichever client runs the query.

Constructors

Link copied to clipboard
constructor(name: String, kClass: KClass<T>, serializer: KSerializer<T>, json: EnumAwareJson, strategy: DynamicWriteStrategy)

Properties

Link copied to clipboard

The registering client's Json, with the registered enums folded in as it is resolved.

Link copied to clipboard
Link copied to clipboard

The discriminator, as the database stores it.

Link copied to clipboard

Functions

Link copied to clipboard
fun decode(payload: String, json: Json): Any
Link copied to clipboard
fun encode(value: Any, json: Json): String

The payload as JSON text, which is what the jsonb codec encodes.