Beispiel #1
0
// GetPageQuery is a helper that returns a new db.PageQuery struct initialized
// using the results from a call to GetPagingParams()
func (action *Action) GetPageQuery() db.PageQuery {
	if action.Err != nil {
		return db.PageQuery{}
	}

	r, err := db.NewPageQuery(action.GetPagingParams())

	if err != nil {
		action.Err = err
	}

	return r
}
Beispiel #2
0
// GetPageQuery is a helper that returns a new db.PageQuery struct initialized
// using the results from a call to GetPagingParams()
func (base *Base) GetPageQuery() db.PageQuery {
	if base.Err != nil {
		return db.PageQuery{}
	}

	r, err := db.NewPageQuery(base.GetPagingParams())

	if err != nil {
		base.Err = err
	}

	return r
}