Documentation ¶
Index ¶
- func Decode(cursor string) []interface{}
- func Encode(v reflect.Value, keys []string) string
- type Cursor
- type Order
- type Paginator
- func (p *Paginator) GetNextCursor() Cursor
- func (p *Paginator) Paginate(stmt *gorm.DB, out interface{}) *gorm.DB
- func (p *Paginator) SetAfterCursor(afterCursor string)
- func (p *Paginator) SetBeforeCursor(beforeCursor string)
- func (p *Paginator) SetKeys(keys ...string)
- func (p *Paginator) SetLimit(limit int)
- func (p *Paginator) SetOrder(order Order)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Paginator ¶
type Paginator struct {
// contains filtered or unexported fields
}
Paginator a builder doing pagination
func (*Paginator) GetNextCursor ¶ added in v1.1.2
GetNextCursor returns cursor for next pagination
func (*Paginator) SetAfterCursor ¶
SetAfterCursor sets paging after cursor
func (*Paginator) SetBeforeCursor ¶
SetBeforeCursor sets paging before cursor
Click to show internal directories.
Click to hide internal directories.