Skip to main content

from_sql_resolved

Function from_sql_resolved 

Source
pub fn from_sql_resolved<T: FromSql>(type_: &Type, value: Value) -> Result<T>
Expand description

Converts value, read from a column of type type_, into T.

Wrappers that do not change the value are looked through first: LowCardinality, SimpleAggregateFunction, the actual type of a Variant / Dynamic / Geometry row, Interval* (an Int64), JSON (its text), LineString / MultiPoint (a Ring), MultiLineString (a Polygon) and named tuples. Use this instead of calling FromSql::from_sql directly on a column type.