diff --git a/vendored/sqlite3-parser/src/parser/ast/mod.rs b/vendored/sqlite3-parser/src/parser/ast/mod.rs index 7ee4d58f3..78163b0ce 100644 --- a/vendored/sqlite3-parser/src/parser/ast/mod.rs +++ b/vendored/sqlite3-parser/src/parser/ast/mod.rs @@ -144,7 +144,7 @@ pub enum Stmt { /// columns columns: Option>, /// query - select: Select, + select: Box), /// `UPDATE` Update { /// CTE @@ -707,7 +707,7 @@ pub struct Select { #[derive(Clone, Debug, PartialEq, Eq)] pub struct SelectBody { /// first select - pub select: OneSelect, + pub select: Box, /// compounds pub compounds: Option>, } @@ -888,7 +888,7 @@ pub enum SelectTable { /// table function call TableCall(QualifiedName, Option>, Option), /// `SELECT` subquery - Select(Select, Option), + Select(Box), } impl CreateTableBody { @@ -1549,7 +1549,7 @@ pub struct Limit { #[derive(Clone, Debug, PartialEq, Eq)] pub enum InsertBody { /// `SELECT` or `VALUES` - Select(Select, Option), + Select(Box, /// `ON CONLICT` clause upsert: Option, /// `RETURNING` @@ -1663,7 +1663,7 @@ pub enum TriggerCmd { where_clause: Option, }, /// `SELECT` - Select(Select), + Select(Box, } impl CommonTableExpr { diff --git a/vendored/sqlite3-parser/src/parser/parse.y b/vendored/sqlite3-parser/src/parser/parse.y index a3c3a64bf..6148b72cd 100644 --- a/vendored/sqlite3-parser/src/parser/parse.y +++ b/vendored/sqlite3-parser/src/parser/parse.y @@ -127,7 +127,7 @@ create_table_args(A) ::= LP columnlist(C) conslist_opt(X) RP table_option_set(F) A = CreateTableBody::columns_and_constraints(C, X, F)?; } create_table_args(A) ::= AS select(S). { - A = CreateTableBody::AsSelect(S); + A = CreateTableBody::AsSelect(Box::new(S)); } %type table_option_set {TableOptions} %type table_option {TableOptions} @@ -476,7 +476,7 @@ ifexists(A) ::= . {A = false;} cmd ::= createkw temp(T) VIEW ifnotexists(E) fullname(Y) eidlist_opt(C) AS select(S). { self.ctx.stmt = Some(Stmt::CreateView{ temporary: T, if_not_exists: E, view_name: Y, columns: C, - select: S }); + select: Box::new(S) }); } cmd ::= DROP VIEW ifexists(E) fullname(X). { self.ctx.stmt = Some(Stmt::DropView{ if_exists: E, view_name: X }); @@ -486,7 +486,7 @@ cmd ::= DROP VIEW ifexists(E) fullname(X). { //////////////////////// The SELECT statement ///////////////////////////////// // cmd ::= select(X). { - self.ctx.stmt = Some(Stmt::Select(X)); + self.ctx.stmt = Some(Stmt::Select(Box::new(X))); } %type select {Select} @@ -509,11 +509,11 @@ select(A) ::= selectnowith(X) orderby_opt(Z) limit_opt(L). { } selectnowith(A) ::= oneselect(X). { - A = SelectBody{ select: X, compounds: None }; + A = SelectBody{ select: Box::new(X), compounds: None }; } %ifndef SQLITE_OMIT_COMPOUND_SELECT selectnowith(A) ::= selectnowith(A) multiselect_op(Y) oneselect(Z). { - let cs = CompoundSelect{ operator: Y, select: Z }; + let cs = CompoundSelect{ operator: Y, select: Box::new(Z) }; A.push(cs)?; } %type multiselect_op {CompoundOperator} @@ -621,7 +621,7 @@ seltablist(A) ::= stl_prefix(A) fullname(Y) LP exprlist(E) RP as(Z) %ifndef SQLITE_OMIT_SUBQUERY seltablist(A) ::= stl_prefix(A) LP select(S) RP as(Z) on_using(N). { - let st = SelectTable::Select(S, Z); + let st = SelectTable::Select(Box::new(S), Z); let jc = N; A.push(st, jc)?; } @@ -826,7 +826,7 @@ setlist(A) ::= LP idlist(X) RP EQ expr(Y). { cmd ::= with(W) insert_cmd(R) INTO xfullname(X) idlist_opt(F) select(S) upsert(U). { let (upsert, returning) = U; - let body = InsertBody::Select(S, upsert); + let body = InsertBody::Select(Box::new(S), upsert); self.ctx.stmt = Some(Stmt::Insert{ with: W, or_conflict: R, tbl_name: X, columns: F, body, returning }); } @@ -1241,7 +1241,7 @@ trigger_cmd(A) ::= trigger_cmd(A) ::= insert_cmd(R) INTO trnm(X) idlist_opt(F) select(S) upsert(U). { let (upsert, returning) = U; - A = TriggerCmd::Insert{ or_conflict: R, tbl_name: X, col_names: F, select: S, upsert, returning };/*A-overwrites-R*/ + A = TriggerCmd::Insert{ or_conflict: R, tbl_name: X, col_names: F, select: Box::new(S), upsert, returning };/*A-overwrites-R*/ } // DELETE trigger_cmd(A) ::= DELETE FROM trnm(X) tridxby where_opt(Y). @@ -1249,7 +1249,7 @@ trigger_cmd(A) ::= DELETE FROM trnm(X) tridxby where_opt(Y). // SELECT trigger_cmd(A) ::= select(X). - {A = TriggerCmd::Select(X); /*A-overwrites-X*/} + {A = TriggerCmd::Select(Box::new(X)); /*A-overwrites-X*/} // The special RAISE expression that may occur in trigger programs expr(A) ::= RAISE LP IGNORE RP. { @@ -1368,7 +1368,7 @@ wqas(A) ::= AS. {A = Materialized::Any;} wqas(A) ::= AS MATERIALIZED. {A = Materialized::Yes;} wqas(A) ::= AS NOT MATERIALIZED. {A = Materialized::No;} wqitem(A) ::= nm(X) eidlist_opt(Y) wqas(M) LP select(Z) RP. { - A = CommonTableExpr{ tbl_name: X, columns: Y, materialized: M, select: Z }; /*A-overwrites-X*/ + A = CommonTableExpr{ tbl_name: X, columns: Y, materialized: M, select: Box::new(Z) }; /*A-overwrites-X*/ } wqlist(A) ::= wqitem(X). { A = vec![X]; /*A-overwrites-X*/