TransactionValue

sealed class TransactionValue<out T>

A parameter of a TransactionPlan step whose value may not exist until an earlier step runs - the id an earlier insert generates. It is resolved when the step runs; anything else in a parameter map is passed through as it is.

Type Parameters

T

The type the value will have once resolved.

Inheritors

Constructors

Link copied to clipboard
protected constructor()

Types

Link copied to clipboard
data class FromStep<out T>(val handle: StepHandle<T>) : TransactionValue<T>

An earlier step's result, as its terminal produced it: a Row after fetchRowStrict, a Senator after fetchObjectStrict<Senator>. map takes a part of it.

Link copied to clipboard
class Transformed<IN, out OUT>(val source: TransactionValue<IN>, val transform: (IN) -> OUT) : TransactionValue<OUT>

source with transform applied once it resolves.

Link copied to clipboard
data class Value<out T>(val value: T) : TransactionValue<T>

A value known all along. toTransactionValue is shorter.

Functions

Link copied to clipboard
fun <IN, OUT> TransactionValue<IN>.map(transformation: (IN) -> OUT): TransactionValue<OUT>

Applies transformation to this value once it resolves, so a row becomes the column the next step needs without a step of its own:

Link copied to clipboard

Spreads this map into parameters under its own keys. The name it was filed under is only a placeholder and is not bound.