You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
mongox-go-driver/mongox/query/skip.go

23 lines
356 B

package query
// Skipper is a filter to skip the result
type Skipper interface {
Skip() (skip *int64)
}
// Skip is a simple implementation of the Skipper filter
type Skip int64
var _ Skipper = Skip(0)
// Skip returns a skip number
func (l Skip) Skip() (skip *int64) {
if l <= 0 {
return nil
}
skip = new(int64)
*skip = int64(l)
return skip
}