Skip to content

Commit

Permalink
Reduce allocations on Itoa conversion (#85)
Browse files Browse the repository at this point in the history
  • Loading branch information
moredure committed Mar 18, 2022
1 parent 5d3e5f9 commit 9ec45b1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions sqlite.go
Expand Up @@ -101,10 +101,12 @@ func (dialector Dialector) ClauseBuilders() map[string]clause.ClauseBuilder {
if limit.Limit <= 0 {
limit.Limit = -1
}
builder.WriteString("LIMIT " + strconv.Itoa(limit.Limit))
builder.WriteString("LIMIT ")
builder.WriteString(strconv.Itoa(limit.Limit))
}
if limit.Offset > 0 {
builder.WriteString(" OFFSET " + strconv.Itoa(limit.Offset))
builder.WriteString(" OFFSET ")
builder.WriteString(strconv.Itoa(limit.Offset))
}
}
},
Expand Down

0 comments on commit 9ec45b1

Please sign in to comment.