Skip to main content

json_to_sql

Function json_to_sql 

Source
pub fn json_to_sql(ty: FieldType, v: &Value) -> Result<Value, String>
Expand description

Convert a JSON value into a typed SQL value for the given column type. Returns a human-readable error on a type mismatch (surfaced as a 400).