sqlite3-parser: box big members of createindex

This commit is contained in:
Jussi Saurio
2025-02-09 12:34:53 +02:00
parent 4faadd86b0
commit d177f6195b
2 changed files with 4 additions and 4 deletions

View File

@@ -95,13 +95,13 @@ pub enum Stmt {
/// `IF NOT EXISTS`
if_not_exists: bool,
/// index name
idx_name: QualifiedName,
idx_name: Box<QualifiedName>,
/// table name
tbl_name: Name,
/// indexed columns or expressions
columns: Vec<SortedColumn>,
/// partial index
where_clause: Option<Expr>,
where_clause: Option<Box<Expr>>,
},
/// `CREATE TABLE`
CreateTable {

View File

@@ -1077,8 +1077,8 @@ paren_exprlist(A) ::= LP exprlist(X) RP. {A = X;}
//
cmd ::= createkw uniqueflag(U) INDEX ifnotexists(NE) fullname(X)
ON nm(Y) LP sortlist(Z) RP where_opt(W). {
self.ctx.stmt = Some(Stmt::CreateIndex { unique: U, if_not_exists: NE, idx_name: X,
tbl_name: Y, columns: Z, where_clause: W });
self.ctx.stmt = Some(Stmt::CreateIndex { unique: U, if_not_exists: NE, idx_name: Box::new(X),
tbl_name: Y, columns: Z, where_clause: W.map(Box::new) });
}
%type uniqueflag {bool}