You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let sql = "SELECT params ->> 'name' FROM events";
let select = pg().verified_only_select(sql);
assert_eq!(
SelectItem::UnnamedExpr(Expr::BinaryOp {
left: Box::new(Expr::Identifier(Ident::new("params"))),
op: BinaryOperator::LongArrow,
right: Box::new(Expr::Value(Value::SingleQuotedString("name".to_string()))),
}),
select.projection[0]
);
As library consumers, we work with most dialects. However, the same query semantics produce different structures, and we must support these different cases. This raises the question: to what extent do we want the sqlparser library to provide semantics in addition to syntax?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,
I've noticed that queries that use semi-structured access are parsed differently in different dialects.
Snowflake uses the
JsonAccess
struct:PostgreSQL relies on
BinaryOperator
:As library consumers, we work with most dialects. However, the same query semantics produce different structures, and we must support these different cases. This raises the question: to what extent do we want the sqlparser library to provide semantics in addition to syntax?
Beta Was this translation helpful? Give feedback.
All reactions