func (r *GormTrackerRepository) List(ctx context.Context, criteria criteria.Expression, start *int, limit *int) ([]*app.Tracker, error) {
	where, parameters, err := workitem.Compile(criteria)
	if err != nil {
		return nil, BadParameterError{"expression", criteria}
	}

	log.Info(ctx, map[string]interface{}{
		"query": where,
	}, "Executing tracker repository query...")

	var rows []Tracker
	db := r.db.Where(where, parameters...)
	if start != nil {
		db = db.Offset(*start)
	}
	if limit != nil {
		db = db.Limit(*limit)
	}
	if err := db.Find(&rows).Error; err != nil {
		return nil, errors.WithStack(err)
	}
	result := make([]*app.Tracker, len(rows))

	for i, tracker := range rows {
		t := app.Tracker{
			ID:   strconv.FormatUint(tracker.ID, 10),
			URL:  tracker.URL,
			Type: tracker.Type}
		result[i] = &t
	}
	return result, nil
}
// List returns tracker selected by the given criteria.Expression, starting with start (zero-based) and returning at most limit items
List returns tracker selected by the given criteria.Expression, starting with start (zero-based) and returning at most limit items
// List returns tracker selected by the given criteria . Expression starting with start ( zero - based ) and returning at most limit items
func (r *GormTrackerRepository) List(ctx context.Context, criteria criteria.Expression, start *int, limit *int) ([]*app.Tracker, error) {
	where, parameters, err := workitem.Compile(criteria)
	if err != nil {
		return nil, BadParameterError{"expression", criteria}
	}
	log.Info(ctx, map[string]interface{}{
		"query": where,
	}, "Executing tracker repository query...")
	var rows []Tracker
	db := r.db.Where(where, parameters...)
	if start != nil {
		db = db.Offset(*start)
	}
	if limit != nil {
		db = db.Limit(*limit)
	}
	if err := db.Find(&rows).Error; err != nil {
		return nil, errors.WithStack(err)
	}
	result := make([]*app.Tracker, len(rows))
	for i, tracker := range rows {
		t := app.Tracker{
			ID:   strconv.FormatUint(tracker.ID, 10),
			URL:  tracker.URL,
			Type: tracker.Type}
		result[i] = &t
	}
	return result, nil
}
func ( r * GormTrackerRepository ) List ( ctx context . Context , criteria criteria . Expression , start * int , limit * int ) ( [ ] * app . Tracker , error ) { where , parameters , err := workitem . Compile ( criteria ) if err != nil { return nil , BadParameterError { " " , criteria } } log . Info ( ctx , map [ string ] interface { } { " " : where , } , " " ) var rows [ ] Tracker db := r . db . Where ( where , parameters ... ) if start != nil { db = db . Offset ( * start ) } if limit != nil { db = db . Limit ( * limit ) } if err := db . Find ( & rows ) . Error ; err != nil { return nil , errors . WithStack ( err ) } result := make ( [ ] * app . Tracker , len ( rows ) ) for i , tracker := range rows { t := app . Tracker { ID : strconv . FormatUint ( tracker . ID , 10 ) , URL : tracker . URL , Type : tracker . Type } result [ i ] = & t } return result , nil }
List returns tracker selected by the given criteria.Expression, starting with start (zero-based) and returning at most limit items
List returns tracker selected by the given criteria . Expression starting with start ( zero - based ) and returning at most limit items