We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 3670b0c + 3e755c0 commit 5f93fbbCopy full SHA for 5f93fbb
sqlserver.go
@@ -87,12 +87,12 @@ func (dialector Dialector) ClauseBuilders() map[string]clause.ClauseBuilder {
87
builder.WriteString(" ROWS")
88
}
89
90
- if limit.Limit > 0 {
+ if limit.Limit != nil && *limit.Limit >= 0 {
91
if limit.Offset == 0 {
92
builder.WriteString("OFFSET 0 ROW")
93
94
builder.WriteString(" FETCH NEXT ")
95
- builder.WriteString(strconv.Itoa(limit.Limit))
+ builder.WriteString(strconv.Itoa(*limit.Limit))
96
builder.WriteString(" ROWS ONLY")
97
98
0 commit comments