Skip to main content

parse_order_term

Function parse_order_term 

Source
pub fn parse_order_term(term_str: &str) -> Result<OrderTerm, ParseError>
Expand description

Parses a single order term from a string.

ยงExamples

use postgrest_parser::{parse_order_term, Direction};

let term = parse_order_term("created_at.desc").unwrap();
assert_eq!(term.field.name, "created_at");
assert_eq!(term.direction, Direction::Desc);