json_object_contains_key

Function json_object_contains_key 

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

Create a JSON object contains key condition

ยงExample

let column = SQL::<SQLiteValue>::raw("metadata");
let condition = json_object_contains_key(column, "$", "theme");
assert_eq!(condition.sql(), "json_type( metadata , '$.theme') IS NOT NULL");