public virtual IList <TestInstanceData> GetTestInstances(string filterString) { string cmd = SqlCommandFactory.CreateQueryCmd(filterString, DataBaseItemNames.InstanceTableName); using (DbDataReader dataReader = ExecuteReadCommand(cmd)) { List <TestInstanceData> testInstanceDatas = new List <TestInstanceData>(50); while (dataReader.Read()) { TestInstanceData instanceData = new TestInstanceData(); DataModelMapper.ReadToObject(dataReader, instanceData); testInstanceDatas.Add(instanceData); } return(testInstanceDatas); } }
public virtual RuntimeStatusData GetRuntimeStatusByIndex(string runtimeHash, long index) { string filter = $"{DataBaseItemNames.RuntimeIdColumn}='{runtimeHash}' AND {DataBaseItemNames.StatusIndexColumn}={index}"; string cmd = SqlCommandFactory.CreateQueryCmd(filter, DataBaseItemNames.StatusTableName); RuntimeStatusData statusData = null; using (DbDataReader dataReader = ExecuteReadCommand(cmd)) { while (dataReader.Read()) { statusData = new RuntimeStatusData(); DataModelMapper.ReadToObject(dataReader, statusData); } } return(statusData); }
public virtual PerformanceStatus GetPerformanceStatusByIndex(string runtimeHash, long index) { string filter = $"{DataBaseItemNames.RuntimeIdColumn}='{runtimeHash}' AND {DataBaseItemNames.StatusIndexColumn}={index}"; string cmd = SqlCommandFactory.CreateQueryCmd(filter, DataBaseItemNames.PerformanceTableName); PerformanceStatus performanceStatus = null; using (DbDataReader dataReader = ExecuteReadCommand(cmd)) { if (dataReader.Read()) { performanceStatus = new PerformanceStatus(); DataModelMapper.ReadToObject(dataReader, performanceStatus); } } return(performanceStatus); }
public virtual IList <SequenceResultData> GetSequenceResults(string runtimeHash, int sessionId) { string filter = $"{DataBaseItemNames.RuntimeIdColumn}='{runtimeHash}' AND {DataBaseItemNames.SessionIdColumn}={sessionId}"; string cmd = SqlCommandFactory.CreateQueryCmd(filter, DataBaseItemNames.SequenceTableName); using (DbDataReader dataReader = ExecuteReadCommand(cmd)) { List <SequenceResultData> resultDatas = new List <SequenceResultData>(10); while (dataReader.Read()) { SequenceResultData sequenceResultData = new SequenceResultData(); DataModelMapper.ReadToObject(dataReader, sequenceResultData); resultDatas.Add(sequenceResultData); } return(resultDatas); } }
protected SessionResultData InternalGetSessionResult(string runtimeHash, int sessionId) { string filter = $"{DataBaseItemNames.RuntimeIdColumn}='{runtimeHash}' AND {DataBaseItemNames.SessionIdColumn}={sessionId}"; string cmd = SqlCommandFactory.CreateQueryCmd(filter, DataBaseItemNames.SessionTableName); using (DbDataReader dataReader = ExecuteReadCommand(cmd)) { SessionResultData sessionResultData = null; if (dataReader.Read()) { sessionResultData = new SessionResultData(); DataModelMapper.ReadToObject(dataReader, sessionResultData); } return(sessionResultData); } }
protected TestInstanceData InternalGetTestInstanceData(string runtimeHash) { string filter = $"{DataBaseItemNames.RuntimeIdColumn}='{runtimeHash}'"; string cmd = SqlCommandFactory.CreateQueryCmd(filter, DataBaseItemNames.InstanceTableName); using (DbDataReader dataReader = ExecuteReadCommand(cmd)) { TestInstanceData instanceData; if (dataReader.Read()) { instanceData = new TestInstanceData(); DataModelMapper.ReadToObject(dataReader, instanceData); } else { instanceData = null; } return(instanceData); } }