Skip to content

Commit

Permalink
change OrderBy to a slice for the sqlparser package
Browse files Browse the repository at this point in the history
Signed-off-by: Andres Taylor <andres@planetscale.com>
  • Loading branch information
systay committed Feb 5, 2025
1 parent 874f74a commit 7315bbc
Show file tree
Hide file tree
Showing 13 changed files with 256 additions and 127 deletions.
18 changes: 9 additions & 9 deletions go/vt/sqlparser/ast.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ type (
OrderAndLimit interface {
AddOrder(*Order)
SetLimit(*Limit)
GetOrderBy() OrderBy
SetOrderBy(OrderBy)
GetOrderBy() []*Order
SetOrderBy([]*Order)
GetLimit() *Limit
}

Expand Down Expand Up @@ -300,7 +300,7 @@ type (
GroupBy *GroupBy
Having *Where
Windows NamedWindows
OrderBy OrderBy
OrderBy []*Order
Limit *Limit
Lock Lock
Into *SelectInto
Expand Down Expand Up @@ -329,7 +329,7 @@ type (
Left TableStatement
Right TableStatement
Distinct bool
OrderBy OrderBy
OrderBy []*Order
Limit *Limit
Lock Lock
Into *SelectInto
Expand Down Expand Up @@ -388,7 +388,7 @@ type (
TableExprs []TableExpr
Exprs UpdateExprs
Where *Where
OrderBy OrderBy
OrderBy []*Order
Limit *Limit
}

Expand All @@ -402,7 +402,7 @@ type (
Targets TableNames
Partitions Partitions
Where *Where
OrderBy OrderBy
OrderBy []*Order
Limit *Limit
}

Expand Down Expand Up @@ -2211,7 +2211,7 @@ type (
WindowSpecification struct {
Name IdentifierCI
PartitionClause []Expr
OrderClause OrderBy
OrderBy []*Order
FrameClause *FrameClause
}

Expand Down Expand Up @@ -3063,7 +3063,7 @@ type (
GroupConcatExpr struct {
Distinct bool
Exprs []Expr
OrderBy OrderBy
OrderBy []*Order
Separator string
Limit *Limit
}
Expand Down Expand Up @@ -3617,7 +3617,7 @@ type ValuesStatement struct {
ListArg ListArg

Comments *ParsedComments
Order OrderBy
OrderBy []*Order
Limit *Limit
}

Expand Down
26 changes: 19 additions & 7 deletions go/vt/sqlparser/ast_clone.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

88 changes: 72 additions & 16 deletions go/vt/sqlparser/ast_copy_on_rewrite.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 7315bbc

Please sign in to comment.