mirror of
https://github.com/aljazceru/turso.git
synced 2026-01-28 04:14:34 +01:00
sqlite3-parser: box the having clause in GroupBy
This commit is contained in:
@@ -1005,7 +1005,7 @@ pub struct GroupBy {
|
||||
/// expressions
|
||||
pub exprs: Vec<Expr>,
|
||||
/// `HAVING`
|
||||
pub having: Option<Expr>, // HAVING clause on a non-aggregate query
|
||||
pub having: Option<Box<Expr>>, // HAVING clause on a non-aggregate query
|
||||
}
|
||||
|
||||
/// identifier or one of several keywords or `INDEXED`
|
||||
|
||||
@@ -731,7 +731,7 @@ nulls(A) ::= . {A = None;}
|
||||
|
||||
%type groupby_opt {Option<GroupBy>}
|
||||
groupby_opt(A) ::= . {A = None;}
|
||||
groupby_opt(A) ::= GROUP BY nexprlist(X) having_opt(Y). {A = Some(GroupBy{ exprs: X, having: Y });}
|
||||
groupby_opt(A) ::= GROUP BY nexprlist(X) having_opt(Y). {A = Some(GroupBy{ exprs: X, having: Y.map(Box::new) });}
|
||||
|
||||
%type having_opt {Option<Expr>}
|
||||
having_opt(A) ::= . {A = None;}
|
||||
|
||||
Reference in New Issue
Block a user