Changeset 15671 for branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/HiveStatistics
- Timestamp:
- 01/30/18 12:56:00 (7 years ago)
- Location:
- branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/HiveStatistics
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/HiveStatistics/DimClientDao.cs
r14185 r15671 33 33 } 34 34 35 public IQueryable<DimClient> GetA ctiveClients() {36 return Table.Where(x => x. ExpirationTime== null);35 public IQueryable<DimClient> GetAllOnlineClients() { 36 return Table.Where(x => x.DateExpired == null); 37 37 } 38 38 39 public IQueryable<DimClient> GetExpiredClients() { 40 return Table.Where(x => x.ExpirationTime != null); 39 public IQueryable<DimClient> GetAllExpiredClients() { 40 return Table.Where(x => x.DateExpired != null); 41 } 42 43 public IQueryable<DimClient> GetAllOnlineSlaves() { 44 return Table.Where(x => x.DateExpired == null && x.ResourceType == "Slave"); 45 } 46 47 public IQueryable<DimClient> GetAllOnlineSlaveGroups() { 48 return Table.Where(x => x.DateExpired == null && x.ResourceType == "GROUP"); 49 } 50 51 public IQueryable<DimClient> GetAllExpiredSlaves() { 52 return Table.Where(x => x.DateExpired != null && x.ResourceType == "Slave"); 53 } 54 55 public IQueryable<DimClient> GetAllExpiredSlaveGroups() { 56 return Table.Where(x => x.DateExpired != null && x.ResourceType == "GROUP"); 41 57 } 42 58 … … 44 60 string paramIds = string.Join(",", ids.Select(x => string.Format("'{0}'", x))); 45 61 if (!string.IsNullOrWhiteSpace(paramIds)) { 46 string query = string.Format(Update ExpirationTimeQuery, "{0}", paramIds);62 string query = string.Format(UpdateDateExpiredQuery, "{0}", paramIds); 47 63 return DataContext.ExecuteCommand(query, time); 48 64 } … … 59 75 60 76 #region String queries 61 private const string Update ExpirationTimeQuery =77 private const string UpdateDateExpiredQuery = 62 78 @"UPDATE [statistics].[DimClient] 63 SET ExpirationTime= {0}79 SET DateExpired = {0} 64 80 WHERE Id IN ({1});"; 65 81 #endregion -
branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/HiveStatistics/DimProjectDao.cs
r15659 r15671 60 60 (from dimProject in db.GetTable<DimProject>() 61 61 where dimProject.ProjectId == projectId 62 orderby dimProject.DateCreated 62 && dimProject.DateExpired == null 63 orderby dimProject.DateCreated descending 63 64 select dimProject.Id).SingleOrDefault()); 64 65 private static readonly Func<DataContext, IEnumerable<DimProject>> GetAllOnlineProjectsQuery = -
branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/HiveStatistics/FactTaskDao.cs
r14185 r15671 66 66 return from factTask in Table 67 67 join client in DimClientTable on factTask.LastClientId equals client.Id 68 where client. ResourceGroupId == id68 where client.ParentResourceId == id 69 69 select factTask; 70 70 }
Note: See TracChangeset
for help on using the changeset viewer.