Changeset 16311 for branches/2845_EnhancedProgress/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/HiveStatistics/DimClientDao.cs
- Timestamp:
- 11/20/18 15:26:57 (6 years ago)
- Location:
- branches/2845_EnhancedProgress
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2845_EnhancedProgress
- Property svn:mergeinfo changed
-
branches/2845_EnhancedProgress/HeuristicLab.Services.Hive.DataAccess
- Property svn:mergeinfo changed
-
branches/2845_EnhancedProgress/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/HiveStatistics/DimClientDao.cs
r16308 r16311 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 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
Note: See TracChangeset
for help on using the changeset viewer.