MCPcopy Create free account
hub / github.com/apache/devlake / GetPageSizeOr

Method GetPageSizeOr

backend/server/services/base.go:44–49  ·  view source on GitHub ↗

GetPageSizeOr returns the page size or fallback to `defaultVal`

(defaultVal int)

Source from the content-addressed store, hash-verified

42
43// GetPageSizeOr returns the page size or fallback to `defaultVal`
44func (p *Pagination) GetPageSizeOr(defaultVal int) int {
45 if p.PageSize < 1 {
46 return defaultVal
47 }
48 return p.PageSize
49}
50
51// GetSkip returns how many records should be skipped for specified page
52func (p *Pagination) GetSkip() int {

Callers 2

GetPageSizeMethod · 0.95
GetTasksFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected