json_text_contains

Function json_text_contains 

Source
pub fn json_text_contains<'a, L, R>(
    left: L,
    path: &'a str,
    value: R,
) -> SQLiteSQL<'a>
where L: ToSQL<'a, SQLiteValue<'a>>, R: Into<SQLiteValue<'a>> + ToSQL<'a, SQLiteValue<'a>>,
Expand description

Create a JSON text search condition using case-insensitive matching

ยงExample

let column = SQL::<SQLiteValue>::raw("metadata");
let condition = json_text_contains(column, "$.description", "user");
assert_eq!(condition.sql(), "instr(lower(json_extract( metadata , '$.description'))), lower( ? )) > 0");