mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 09:37:45 +00:00
chore: move the go code into a subfolder
This commit is contained in:
17
apps/api/internal/v2/database/pagination.go
Normal file
17
apps/api/internal/v2/database/pagination.go
Normal file
@@ -0,0 +1,17 @@
|
||||
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)
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user