describeValue

internal fun describeValue(value: TransactionValue<*>, stepIndices: Map<StepHandle<*>, Int>? = null): String

Renders a value as the chain that will produce it.

Used by a plan's description, by a failure that has to say which of several maps on one parameter threw, and by TransactionValue.Transformed.toString.

A handle is rendered as its position in stepIndices wherever that is known, because a handle's own toString carries the index it was created at - which after TransactionPlan.addPlan is no longer where that step sits in the plan being run. Where it is not known the handle speaks for itself, and naming the plan it was created in is exactly what is wanted at that spot.

What a literal is is deliberately not rendered. The wiring is the part that is invisible in the code that assembled the plan; a bound value is not, and putting one here would put a bytea parameter or a column of personal data into whatever the description was written to.

Return

The chain, source first.

Parameters

value

The value to render.

stepIndices

Where each handle's step sits in the plan in hand, where there is one.