Skip to content

Commit

Permalink
improve sql parser bigquery support
Browse files Browse the repository at this point in the history
  • Loading branch information
wenshao committed Dec 19, 2024
1 parent 5a1a5f0 commit 9faeba9
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,18 @@ public void addItem(SQLUpdateSetItem item) {
this.items.add(item);
}

public SQLUpdateSetItem findItemByColumn(SQLExpr column) {
if (column == null) {
return null;
}
for (SQLUpdateSetItem item : items) {
if (item.getColumn().equals(column)) {
return item;
}
}
return null;
}

@Override
public void accept0(SQLASTVisitor v) {
if (v.visit(this)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ public class SQLUpdateSetItem extends SQLObjectImpl implements SQLReplaceable {
public SQLUpdateSetItem() {
}

public SQLUpdateSetItem(SQLExpr column, SQLExpr value) {
this.setColumn(column);
this.setValue(value);
}

public SQLExpr getColumn() {
return column;
}
Expand Down

0 comments on commit 9faeba9

Please sign in to comment.