func (r *GormWorkItemRepository) Count(ctx context.Context, spaceID uuid.UUID, criteria criteria.Expression) (int, error) {
	where, parameters, compileError := Compile(criteria)
	if compileError != nil {
		return 0, errors.NewBadParameterError("expression", criteria)
	}
	where = where + " AND space_id = ?"
	parameters = append(parameters, spaceID)

	var count int
	r.db.Model(&WorkItemStorage{}).Where(where, parameters...).Count(&count)
	return count, nil
}
// Counts returns the amount of work item that satisfy the given criteria.Expression
Counts returns the amount of work item that satisfy the given criteria.Expression
// Counts returns the amount of work item that satisfy the given criteria . Expression
func (r *GormWorkItemRepository) Count(ctx context.Context, spaceID uuid.UUID, criteria criteria.Expression) (int, error) {
	where, parameters, compileError := Compile(criteria)
	if compileError != nil {
		return 0, errors.NewBadParameterError("expression", criteria)
	}
	where = where + " AND space_id = ?"
	parameters = append(parameters, spaceID)
	var count int
	r.db.Model(&WorkItemStorage{}).Where(where, parameters...).Count(&count)
	return count, nil
}
func ( r * GormWorkItemRepository ) Count ( ctx context . Context , spaceID uuid . UUID , criteria criteria . Expression ) ( int , error ) { where , parameters , compileError := Compile ( criteria ) if compileError != nil { return 0 , errors . NewBadParameterError ( " " , criteria ) } where = where + " " parameters = append ( parameters , spaceID ) var count int r . db . Model ( & WorkItemStorage { } ) . Where ( where , parameters ... ) . Count ( & count ) return count , nil }
Counts returns the amount of work item that satisfy the given criteria.Expression
Counts returns the amount of work item that satisfy the given criteria . Expression