Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
type Connection[Model any] struct { TotalCount int64 `json:"totalCount"` Edges []*Edge[Model] `json:"edges"` PageInfo *PageInfo `json:"pageInfo"` }
func Paginate ¶
func Paginate[Model any](db *gorm.DB, _where any, _orderBy any, option PaginateOption) (*Connection[Model], error)
type PageInfo ¶
type PageInfo struct { HasNextPage bool `json:"hasNextPage"` HasPreviousPage bool `json:"hasPreviousPage"` StartCursor *string `json:"startCursor,omitempty"` EndCursor *string `json:"endCursor,omitempty"` }
func (*PageInfo) SetHasNextPage ¶ added in v1.1.1
func (*PageInfo) SetHasPreviousPage ¶ added in v1.1.1
Click to show internal directories.
Click to hide internal directories.