Skip to main content

split_where_clause

Function split_where_clause 

Source
pub fn split_where_clause(
    where_clause: &WhereClause,
    column_name: &str,
) -> Option<SplitWhereResult>
Expand description

Splits a WHERE clause into the extracted lower-bound date and remaining conditions.

Returns None if no lower-bound date condition is found on column_name. When found, the matched condition is removed from the clause:

  • If the clause was a single condition, remaining is None.
  • If the clause was an AND chain, the matched child is removed. If only one child remains, the AND wrapper is unwrapped.

§Arguments

  • where_clause — the WHERE clause to split
  • column_name — the time-grain column to look for