mirror of
https://github.com/glebarez/sqlite.git
synced 2025-10-05 07:36:58 +08:00
The limit clause should be included when the limit value is greater than or equal to zero.
This commit is contained in:
@@ -101,7 +101,7 @@ func (dialector Dialector) ClauseBuilders() map[string]clause.ClauseBuilder {
|
||||
if limit.Limit != nil && *limit.Limit >= 0 {
|
||||
lmt = *limit.Limit
|
||||
}
|
||||
if lmt > 0 || limit.Offset > 0 {
|
||||
if lmt >= 0 || limit.Offset > 0 {
|
||||
builder.WriteString("LIMIT ")
|
||||
builder.WriteString(strconv.Itoa(lmt))
|
||||
}
|
||||
|
Reference in New Issue
Block a user