forked from ddrilling/AsbCloudServer
Fixed return of .DepthToInterval() analytics method
This commit is contained in:
parent
3c9718b0de
commit
b022a4c1cb
@ -378,23 +378,22 @@ namespace AsbCloudDb.Model
|
|||||||
Database.OpenConnection();
|
Database.OpenConnection();
|
||||||
using var reader = await command.ExecuteReaderAsync(token);
|
using var reader = await command.ExecuteReaderAsync(token);
|
||||||
|
|
||||||
IEnumerable<(double? MinDepth, double? MaxDepth, DateTime BeginPeriodDate)> GetResult(DbDataReader rd)
|
var result = new List<(double? MinDepth, double? MaxDepth, DateTime BeginPeriodDate)>();
|
||||||
{
|
|
||||||
if (rd.HasRows)
|
if (reader.HasRows)
|
||||||
{
|
{
|
||||||
while (reader.Read())
|
while (reader.Read())
|
||||||
{
|
{
|
||||||
yield return
|
result.Add(
|
||||||
(
|
(
|
||||||
(double?)reader.GetValue(0),
|
(double?)reader.GetValue(0),
|
||||||
(double?)reader.GetValue(1),
|
(double?)reader.GetValue(1),
|
||||||
(DateTime)reader.GetValue(2)
|
(DateTime)reader.GetValue(2)
|
||||||
);
|
));
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return GetResult(reader);
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<int> CreatePartitionAsync<TEntity>(string propertyName, int id, CancellationToken token = default)
|
public async Task<int> CreatePartitionAsync<TEntity>(string propertyName, int id, CancellationToken token = default)
|
||||||
|
Loading…
Reference in New Issue
Block a user