Skip to main content

like_pattern

Function like_pattern 

Source
pub fn like_pattern(operator: FilterOperator, text: &str) -> Option<String>
Expand description

The LIKE pattern to bind for a LIKE operator: the escaped text wrapped in % wildcards. None for the comparison operators, which bind the value itself.

Kept separate so the wildcard placement can be unit-tested directly: the value is pushed as a bound parameter and therefore never appears in the rendered SQL.