Skip to main content

encode_to_kind

Function encode_to_kind 

Source
pub fn encode_to_kind(value: &Value, ty: &SpannerType) -> Result<Kind, String>
Available on crate features sink-spanner or source-spanner only.
Expand description

Encode one JSON value for a destination column of type ty.

Returns a human-readable error naming the mismatch; callers wrap it with the column name and route the row to the DLQ or fail the batch.