Skip to content

Commit

Permalink
fix typo and some refactor
Browse files Browse the repository at this point in the history
Signed-off-by: Harshit Gangal <[email protected]>
  • Loading branch information
harshit-gangal committed Feb 13, 2024
1 parent 3d456e8 commit a52c54a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 40 deletions.
2 changes: 1 addition & 1 deletion changelog/20.0/20.0.0/summary.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
## <a id="major-changes"/>Major Changes


### <a id="query-compatibility"/>Query Serving
### <a id="query-compatibility"/>Query Compatibility

#### <a id="vindex-hints"/> Vindex Hints

Expand Down
6 changes: 3 additions & 3 deletions go/vt/sqlparser/ast.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,6 @@ type (

OrderAndLimit interface {
AddOrder(*Order)
SetOrderBy(OrderBy)
GetOrderBy() OrderBy
GetLimit() *Limit
SetLimit(*Limit)
}

Expand All @@ -76,6 +73,9 @@ type (
GetColumns() SelectExprs
Commented
IsDistinct() bool
GetOrderBy() OrderBy
SetOrderBy(OrderBy)
GetLimit() *Limit
}

// DDLStatement represents any DDL Statement
Expand Down
36 changes: 0 additions & 36 deletions go/vt/sqlparser/ast_funcs.go
Original file line number Diff line number Diff line change
Expand Up @@ -2606,34 +2606,10 @@ func MultiTable(node []TableExpr) bool {
return !singleTbl
}

func (node *Select) AddFrom(tbl TableExpr) {
node.From = append(node.From, tbl)
}

func (node *Update) AddFrom(tbl TableExpr) {
node.TableExprs = append(node.TableExprs, tbl)
}

func (node *Delete) AddFrom(tbl TableExpr) {
node.TableExprs = append(node.TableExprs, tbl)
}

func (node *Update) AddOrder(order *Order) {
node.OrderBy = append(node.OrderBy, order)
}

func (node *Update) SetOrderBy(by OrderBy) {
node.OrderBy = by
}

func (node *Update) GetOrderBy() OrderBy {
return node.OrderBy
}

func (node *Update) GetLimit() *Limit {
return node.Limit
}

func (node *Update) SetLimit(limit *Limit) {
node.Limit = limit
}
Expand All @@ -2642,18 +2618,6 @@ func (node *Delete) AddOrder(order *Order) {
node.OrderBy = append(node.OrderBy, order)
}

func (node *Delete) SetOrderBy(by OrderBy) {
node.OrderBy = by
}

func (node *Delete) GetOrderBy() OrderBy {
return node.OrderBy
}

func (node *Delete) GetLimit() *Limit {
return node.Limit
}

func (node *Delete) SetLimit(limit *Limit) {
node.Limit = limit
}
Expand Down

0 comments on commit a52c54a

Please sign in to comment.