Skip to content

Commit

Permalink
Count ORDER BY Clauses When Deciding Whether to Wrap SOQL Queries
Browse files Browse the repository at this point in the history
  • Loading branch information
cwarden committed Dec 9, 2023
1 parent ade84c5 commit ee63be0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions formatter/chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ func (v *ChainVisitor) VisitQuery(ctx *parser.QueryContext) interface{} {
return score
}

func (v *ChainVisitor) VisitOrderByClause(ctx *parser.OrderByClauseContext) interface{} {
return len(ctx.FieldOrderList().AllFieldOrder())
}

func (v *ChainVisitor) VisitSelectList(ctx *parser.SelectListContext) interface{} {
score := 0
for _, p := range ctx.AllSelectEntry() {
Expand Down

0 comments on commit ee63be0

Please sign in to comment.