Skip to main content

json_not_exists

Function json_not_exists 

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

Create a JSON field does not exist condition

ยงExample

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