json_extract_text

Function json_extract_text 

Source
pub fn json_extract_text<'a, L>(left: L, path: &'a str) -> SQLiteSQL<'a>
where L: ToSQL<'a, SQLiteValue<'a>>,
Expand description

Helper function for JSON extraction as JSON text using -> operator

ยงExample

let column = SQL::<SQLiteValue>::raw("metadata");
let extract_expr = json_extract_text(column, "preferences");
assert_eq!(extract_expr.sql(), "metadata ->'preferences'");