56 lines
2.0 KiB
C#
56 lines
2.0 KiB
C#
using Persistence.Models;
|
||
|
||
namespace Persistence.Client.Clients.Interfaces;
|
||
|
||
/// <summary>
|
||
/// Клиент для работы с данными с отметкой времени
|
||
/// </summary>
|
||
public interface ITimestampedSetClient
|
||
{
|
||
/// <summary>
|
||
/// Записать новые данные
|
||
/// </summary>
|
||
/// <param name="idDiscriminator"></param>
|
||
/// <param name="sets"></param>
|
||
/// <param name="token"></param>
|
||
/// <returns></returns>
|
||
Task<int> AddRange(Guid idDiscriminator, IEnumerable<TimestampedSetDto> sets, CancellationToken token);
|
||
|
||
/// <summary>
|
||
/// Количество записей по указанному набору в БД. Для пагинации
|
||
/// </summary>
|
||
/// <param name="idDiscriminator"></param>
|
||
/// <param name="token"></param>
|
||
/// <returns></returns>
|
||
Task<int> Count(Guid idDiscriminator, CancellationToken token);
|
||
|
||
/// <summary>
|
||
/// Получение данных с фильтрацией. Значение фильтра null - отключен
|
||
/// </summary>
|
||
/// <param name="idDiscriminator"></param>
|
||
/// <param name="geTimestamp"></param>
|
||
/// <param name="columnNames"></param>
|
||
/// <param name="skip"></param>
|
||
/// <param name="take"></param>
|
||
/// <param name="token"></param>
|
||
/// <returns></returns>
|
||
Task<IEnumerable<TimestampedSetDto>> Get(Guid idDiscriminator, DateTimeOffset? geTimestamp, IEnumerable<string>? columnNames, int skip, int take, CancellationToken token);
|
||
|
||
/// <summary>
|
||
/// Диапазон дат за которые есть данные
|
||
/// </summary>
|
||
/// <param name="idDiscriminator"></param>
|
||
/// <param name="token"></param>
|
||
/// <returns></returns>
|
||
Task<DatesRangeDto?> GetDatesRange(Guid idDiscriminator, CancellationToken token);
|
||
|
||
/// <summary>
|
||
///
|
||
/// </summary>
|
||
/// <param name="idDiscriminator"></param>
|
||
/// <param name="columnNames"></param>
|
||
/// <param name="take"></param>
|
||
/// <param name="token"></param>
|
||
/// <returns></returns>
|
||
Task<IEnumerable<TimestampedSetDto>> GetLast(Guid idDiscriminator, IEnumerable<string>? columnNames, int take, CancellationToken token);
|
||
} |