pub fn to_jsonb(ecx: &ExprContext<'_>, expr: HirScalarExpr) -> HirScalarExprExpand description
Converts an expression to SqlScalarType::Jsonb.
The rules are as follows:
SqlScalarType::Booleans become JSON booleans.- All numeric types are converted to
Float64s, then become JSON numbers. - Records are converted to a JSON object where the record’s field names
are the keys of the object, and the record’s fields are recursively
converted to JSON by
to_jsonb. - Other types are converted to strings by their usual cast function an