Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/08/18 11:13:15 (7 years ago)
Author:
jzenisek
Message:

#2839

  • updated sql scripts (necessary foreign key option alterations & introduction of statistic tables)
  • updated HiveService according to changed client side (deletion-routine, permission checking,...)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/ProjectDao.cs

    r15666 r15737  
    3737    public override Project GetById(Guid id) {
    3838      return GetByIdQuery(DataContext, id);
     39    }
     40
     41    public void DeleteByIds(IEnumerable<Guid> ids) {
     42      string paramProjectIds = string.Join(",", ids.ToList().Select(x => string.Format("'{0}'", x)));
     43      if(!string.IsNullOrWhiteSpace(paramProjectIds)) {
     44        string queryString = string.Format(DeleteByIdsQueryString, paramProjectIds);
     45        DataContext.ExecuteCommand(queryString);
     46      }
    3947    }
    4048
     
    93101
    94102    #region String queries
     103    private const string DeleteByIdsQueryString = @"
     104      DELETE FROM [Project]
     105      WHERE ProjectId IN ({0})
     106    ";
     107
    95108    private const string GetUsageStatsPerProjectQueryString = @"
    96109      SELECT j.ProjectId, SUM(t.CoresNeeded) AS Cores, SUM(t.MemoryNeeded) AS Memory
Note: See TracChangeset for help on using the changeset viewer.