Skip to main content

validate_sql_order_by

Function validate_sql_order_by 

Source
pub fn validate_sql_order_by(order_by: &str) -> Result<(), ParserError>
Expand description

Validate the body of an ORDER BY clause (e.g. “ts asc, lsn desc”).

Unlike validate_sql_expression, this accepts the comma-separated, ASC/DESC/NULLS annotated key list a real ORDER BY allows, and requires the whole string to parse so a malformed clause fails here rather than silently dropping every key after the first.