simple/
simple.rs

1use restq::*;
2
3fn main() {
4    let input = "person{person_id,name,updated}?age=lt.42&(student=eq.true|gender=eq.'M')&group_by=sum(age),grade,gender&having=min(age)=gt.42&order_by=age.desc,height.asc&page=20&page_size=100";
5    let input_chars = to_chars(input);
6    let ret = select().parse(&input_chars).expect("must be parsed");
7    println!("ret: {:#?}", ret);
8    println!("ret sql: {}", ret.to_string());
9    let sql = ret.into_sql_statement(None).unwrap();
10    println!("sql: {}", sql.to_string());
11}