Skip to content

Commit

Permalink
♻️ Refator(paginate.go): update index arg
Browse files Browse the repository at this point in the history
  • Loading branch information
booscaaa committed Nov 10, 2023
1 parent 017ec7f commit 0d16a6a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions v2/paginate/paginate.go
Original file line number Diff line number Diff line change
Expand Up @@ -278,9 +278,9 @@ func GenerateSQL(params *paginQueryParams) (string, []interface{}) {
args[len(args)-2] = params.mapArgs[column]
args[len(args)-1] = params.mapArgs["id"]
} else {
sortClauses = append(sortClauses, fmt.Sprintf("(((%s = $%d) OR (%s %s $%d))",
sortClauses = append(sortClauses, fmt.Sprintf("((%s = $%d) OR (%s %s $%d))",
columnName, argNum, columnName, getComparisonOperator(params.SortDirections[i]), argNum))
args[len(args)-2] = params.mapArgs[column]
args[len(args)-1] = params.mapArgs[column]
}
}
}
Expand Down

0 comments on commit 0d16a6a

Please sign in to comment.