Skip to content

Commit

Permalink
Merge pull request #59 from juaismar/juanito/feat/orderNull
Browse files Browse the repository at this point in the history
Order with nulls and test refactor
  • Loading branch information
juaismar authored Sep 16, 2021
2 parents 2fbc0ff + b18f558 commit 5e2ea5d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions SSP.go
Original file line number Diff line number Diff line change
Expand Up @@ -374,9 +374,9 @@ func order(c Controller, columns []Data) func(db *gorm.DB) *gorm.DB {
columnIdxTittle = fmt.Sprintf("order[%d][dir]", i)
requestColumnData = c.GetString(columnIdxTittle)

order := "desc"
order := "desc NULLS LAST"
if requestColumnData == "asc" {
order = "asc"
order = "asc NULLS FIRST"
}

order = checkOrderDialect(order)
Expand Down

0 comments on commit 5e2ea5d

Please sign in to comment.