feat(instances): GetInstancesPagedAsync SQL-side filter/order/page
This commit is contained in:
@@ -32,6 +32,18 @@ public interface ICentralUiRepository
|
||||
/// <param name="cancellationToken">Cancellation token.</param>
|
||||
/// <returns>A task that resolves to a read-only list of matching instances.</returns>
|
||||
Task<IReadOnlyList<Instance>> GetInstancesFilteredAsync(int? siteId = null, int? templateId = null, string? searchTerm = null, CancellationToken cancellationToken = default);
|
||||
/// <summary>
|
||||
/// Returns one page of instances with SQL-side filtering, ordered by unique name, plus the total
|
||||
/// number of rows matching the filter (before paging).
|
||||
/// </summary>
|
||||
/// <param name="siteIds">Optional site IDs to restrict to; null means all sites, an empty collection matches nothing.</param>
|
||||
/// <param name="templateId">Optional template ID to filter by.</param>
|
||||
/// <param name="search">Optional unique-name prefix (StartsWith).</param>
|
||||
/// <param name="skip">Rows to skip.</param>
|
||||
/// <param name="take">Maximum rows to return.</param>
|
||||
/// <param name="cancellationToken">Cancellation token.</param>
|
||||
/// <returns>A task that resolves to the page of rows and the total matching count.</returns>
|
||||
Task<(IReadOnlyList<Instance> Rows, int Total)> GetInstancesPagedAsync(IReadOnlyCollection<int>? siteIds, int? templateId, string? search, int skip, int take, CancellationToken cancellationToken = default);
|
||||
/// <summary>Returns the most recent deployment records up to the specified count.</summary>
|
||||
/// <param name="count">Maximum number of records to return.</param>
|
||||
/// <param name="cancellationToken">Cancellation token.</param>
|
||||
|
||||
Reference in New Issue
Block a user