增加websocket支持
This commit is contained in:
6
vendor/gorm.io/gorm/clause/limit.go
generated
vendored
6
vendor/gorm.io/gorm/clause/limit.go
generated
vendored
@@ -1,5 +1,7 @@
|
||||
package clause
|
||||
|
||||
import "strconv"
|
||||
|
||||
// Limit limit clause
|
||||
type Limit struct {
|
||||
Limit *int
|
||||
@@ -15,14 +17,14 @@ func (limit Limit) Name() string {
|
||||
func (limit Limit) Build(builder Builder) {
|
||||
if limit.Limit != nil && *limit.Limit >= 0 {
|
||||
builder.WriteString("LIMIT ")
|
||||
builder.AddVar(builder, *limit.Limit)
|
||||
builder.WriteString(strconv.Itoa(*limit.Limit))
|
||||
}
|
||||
if limit.Offset > 0 {
|
||||
if limit.Limit != nil && *limit.Limit >= 0 {
|
||||
builder.WriteByte(' ')
|
||||
}
|
||||
builder.WriteString("OFFSET ")
|
||||
builder.AddVar(builder, limit.Offset)
|
||||
builder.WriteString(strconv.Itoa(limit.Offset))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user