mirror of
https://github.com/aljazceru/turso.git
synced 2025-12-26 04:24:21 +01:00
sqlite3-parser: box the where clause in Update
This commit is contained in:
@@ -256,7 +256,7 @@ pub enum Stmt {
|
||||
/// `FROM`
|
||||
from: Option<FromClause>,
|
||||
/// `WHERE` clause
|
||||
where_clause: Option<Expr>,
|
||||
where_clause: Option<Box<Expr>>,
|
||||
/// `RETURNING`
|
||||
returning: Option<Vec<ResultColumn>>,
|
||||
/// `ORDER BY`
|
||||
|
||||
@@ -791,14 +791,14 @@ cmd ::= with(C) UPDATE orconf(R) xfullname(X) indexed_opt(I) SET setlist(Y) from
|
||||
where_opt_ret(W) orderby_opt(O) limit_opt(L). {
|
||||
let (where_clause, returning) = W;
|
||||
self.ctx.stmt = Some(Stmt::Update { with: C, or_conflict: R, tbl_name: X, indexed: I, sets: Y, from: F,
|
||||
where_clause, returning, order_by: O, limit: L });
|
||||
where_clause: where_clause.map(Box::new), returning, order_by: O, limit: L });
|
||||
}
|
||||
%else
|
||||
cmd ::= with(C) UPDATE orconf(R) xfullname(X) indexed_opt(I) SET setlist(Y) from(F)
|
||||
where_opt_ret(W). {
|
||||
let (where_clause, returning) = W;
|
||||
self.ctx.stmt = Some(Stmt::Update { with: C, or_conflict: R, tbl_name: X, indexed: I, sets: Y, from: F,
|
||||
where_clause, returning, order_by: None, limit: None });
|
||||
where_clause: where_clause.map(Box::new), returning, order_by: None, limit: None });
|
||||
}
|
||||
%endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user