Package-level declarations

Types

Link copied to clipboard
data class DynamicDto(val typeName: String, val dataPayload: String)

The Kotlin side of the dynamic_dto composite: a discriminator and a JSON payload.

Link copied to clipboard
class DynamicTypes(client: OctaviusClient, val json: Json = octaviusJson, val strategy: DynamicWriteStrategy = DynamicWriteStrategy.AUTOMATIC_WHEN_UNAMBIGUOUS)

The dynamic_dto types this client knows, and what you do with them: register, and - where strategy or the class leaves the question open - wrap.

Link copied to clipboard

When an object registered as a dynamic type is written as one without being asked to be.

Link copied to clipboard
internal class EnumAwareJson(base: Json)

The registered enums' serializers, as a module and as a Json with that module folded in, both rebuilt only when the set of registrations changes.

Link copied to clipboard
internal class PgEnumSerializer(enumClass: KClass<*>, registration: PgEnumRegistration) : KSerializer<Any>

Writes a registered enum into JSON under the label PostgreSQL holds, and reads it back.

Properties

Link copied to clipboard

The statements that create the dynamic_dto type and its constructors, written so that running them twice is harmless.

Functions

Link copied to clipboard
internal fun declaredTypeNameOf(kClass: KClass<*>): String

The discriminator kClass declares, for the overloads that take no name.