mirror of
https://github.com/aljazceru/turso.git
synced 2026-01-26 03:14:23 +01:00
sqlite3-parser: box large members of CreateTrigger
This commit is contained in:
@@ -125,13 +125,13 @@ pub enum Stmt {
|
||||
/// `BEFORE`/`AFTER`/`INSTEAD OF`
|
||||
time: Option<TriggerTime>,
|
||||
/// `DELETE`/`INSERT`/`UPDATE`
|
||||
event: TriggerEvent,
|
||||
event: Box<TriggerEvent>,
|
||||
/// table name
|
||||
tbl_name: QualifiedName,
|
||||
/// `FOR EACH ROW`
|
||||
for_each_row: bool,
|
||||
/// `WHEN`
|
||||
when_clause: Option<Expr>,
|
||||
when_clause: Option<Box<Expr>>,
|
||||
/// statements
|
||||
commands: Vec<TriggerCmd>,
|
||||
},
|
||||
|
||||
@@ -1167,8 +1167,8 @@ minus_num(A) ::= MINUS number(X). {A = Expr::unary(UnaryOperator::Negative,
|
||||
cmd ::= createkw temp(T) TRIGGER ifnotexists(NOERR) fullname(B) trigger_time(C) trigger_event(D)
|
||||
ON fullname(E) foreach_clause(X) when_clause(G) BEGIN trigger_cmd_list(S) END. {
|
||||
self.ctx.stmt = Some(Stmt::CreateTrigger{
|
||||
temporary: T, if_not_exists: NOERR, trigger_name: B, time: C, event: D, tbl_name: E,
|
||||
for_each_row: X, when_clause: G, commands: S
|
||||
temporary: T, if_not_exists: NOERR, trigger_name: B, time: C, event: Box::new(D), tbl_name: E,
|
||||
for_each_row: X, when_clause: G.map(Box::new), commands: S
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user