func (r *GormWorkItemRepository) LoadHighestOrder() (float64, error) {
	res := WorkItemStorage{}
	db := r.db.Model(WorkItemStorage{})
	query := fmt.Sprintf("execution_order = (SELECT max(execution_order) FROM %[1]s)",
		WorkItemStorage{}.TableName(),
	)
	db = db.Where(query).First(&res)
	order, err := strconv.ParseFloat(fmt.Sprintf("%v", res.ExecutionOrder), 64)
	if err != nil {
		return 0, errors.NewInternalError(err.Error())
	}
	return order, nil
}
// LoadHighestOrder returns the highest order
LoadHighestOrder returns the highest order
// LoadHighestOrder returns the highest order
func (r *GormWorkItemRepository) LoadHighestOrder() (float64, error) {
	res := WorkItemStorage{}
	db := r.db.Model(WorkItemStorage{})
	query := fmt.Sprintf("execution_order = (SELECT max(execution_order) FROM %[1]s)",
		WorkItemStorage{}.TableName(),
	)
	db = db.Where(query).First(&res)
	order, err := strconv.ParseFloat(fmt.Sprintf("%v", res.ExecutionOrder), 64)
	if err != nil {
		return 0, errors.NewInternalError(err.Error())
	}
	return order, nil
}
func ( r * GormWorkItemRepository ) LoadHighestOrder ( ) ( float64 , error ) { res := WorkItemStorage { } db := r . db . Model ( WorkItemStorage { } ) query := fmt . Sprintf ( " " , WorkItemStorage { } . TableName ( ) , ) db = db . Where ( query ) . First ( & res ) order , err := strconv . ParseFloat ( fmt . Sprintf ( " " , res . ExecutionOrder ) , 64 ) if err != nil { return 0 , errors . NewInternalError ( err . Error ( ) ) } return order , nil }
LoadHighestOrder returns the highest order
LoadHighestOrder returns the highest order