Function partiql::parser::expressions::pqlvalue_with_alias_to_pql_value[][src]

pub fn pqlvalue_with_alias_to_pql_value(input: &str) -> IResult<&str, PqlValue>
Expand description
use std::str::FromStr;
use partiql::parser;
use partiql::value::PqlValue;
fn main() -> anyhow::Result<()> {
  let value = parser::expressions::pqlvalue_with_alias_to_pql_value(r#"[1,2,3] AS arr"#)?.1;
  let expected = PqlValue::from_str(r#"{ "arr" : [1,2,3] }"#)?;
  assert_eq!(value, expected);
  Ok(())
}