Changeset 16723 for branches/2521_ProblemRefactoring/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/HiveStatistics
- Timestamp:
- 03/28/19 16:54:20 (6 years ago)
- Location:
- branches/2521_ProblemRefactoring
- Files:
-
- 8 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/2521_ProblemRefactoring
- Property svn:mergeinfo changed
-
branches/2521_ProblemRefactoring/HeuristicLab.Services.Hive.DataAccess
- Property svn:mergeinfo changed
-
branches/2521_ProblemRefactoring/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/HiveStatistics/DimClientDao.cs
r16692 r16723 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 8Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 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/2521_ProblemRefactoring/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/HiveStatistics/DimJobDao.cs
r16692 r16723 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 8Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2521_ProblemRefactoring/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/HiveStatistics/DimTimeDao.cs
r16692 r16723 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 8Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2521_ProblemRefactoring/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/HiveStatistics/DimUserDao.cs
r16692 r16723 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 8Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2521_ProblemRefactoring/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/HiveStatistics/FactClientInfoDao.cs
r16692 r16723 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 8Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2521_ProblemRefactoring/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/HiveStatistics/FactTaskDao.cs
r16692 r16723 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 8Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 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.