Skip to content

Commit

Permalink
fix: replace table_name with qualified_table_name
Browse files Browse the repository at this point in the history
  • Loading branch information
IdoKendo committed Nov 26, 2024
1 parent 5b6ffd3 commit 5849df4
Show file tree
Hide file tree
Showing 4 changed files with 728 additions and 786 deletions.
4 changes: 2 additions & 2 deletions internal/engine/sqlite/convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -1003,7 +1003,7 @@ func (c *cc) convertTablesOrSubquery(n []parser.ITable_or_subqueryContext) []ast
}

type Update_stmt interface {
Table_name() parser.ITable_nameContext
Qualified_table_name() parser.IQualified_table_nameContext
GetStart() antlr.Token
AllColumn_name() []parser.IColumn_nameContext
WHERE_() antlr.TerminalNode
Expand All @@ -1017,7 +1017,7 @@ func (c *cc) convertUpdate_stmtContext(n Update_stmt) ast.Node {
}

relations := &ast.List{}
tableName := n.Table_name().GetText()
tableName := n.Qualified_table_name().GetText()
rel := ast.RangeVar{
Relname: &tableName,
Location: n.GetStart().GetStart(),
Expand Down
2 changes: 1 addition & 1 deletion internal/engine/sqlite/parser/SQLiteParser.g4
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ compound_operator:
update_stmt:
with_clause? UPDATE_ (
OR_ (ROLLBACK_ | ABORT_ | REPLACE_ | FAIL_ | IGNORE_)
)? table_name (AS_? table_alias)? SET_ (column_name | column_name_list) ASSIGN expr (
)? qualified_table_name SET_ (column_name | column_name_list) ASSIGN expr (
COMMA (column_name | column_name_list) ASSIGN expr
)* (FROM_ table_or_subquery)? (WHERE_ expr)? returning_clause?
;
Expand Down
2 changes: 1 addition & 1 deletion internal/engine/sqlite/parser/SQLiteParser.interp

Large diffs are not rendered by default.

Loading

0 comments on commit 5849df4

Please sign in to comment.