mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-14 03:54:21 +00:00
18 lines
279 B
Go
18 lines
279 B
Go
package database
|
|
|
|
type Pagination struct {
|
|
Limit uint32
|
|
Offset uint32
|
|
}
|
|
|
|
func (p *Pagination) Write(stmt *Statement) {
|
|
if p.Limit > 0 {
|
|
stmt.WriteString(" LIMIT ")
|
|
stmt.WriteArg(p.Limit)
|
|
}
|
|
if p.Offset > 0 {
|
|
stmt.WriteString(" OFFSET ")
|
|
stmt.WriteArg(p.Offset)
|
|
}
|
|
}
|