86883cd5c6
- Refactor migrations and provider to use multiple PostgreSQL schemas, each matching a legacy SQLite database (activitylog, authentication, displaypreferences, library, users). - All tables, foreign keys, and indexes are now schema-qualified; Down migration drops tables by schema. - Provider ensures schemas exist before migrations; entities are mapped to correct schemas in OnModelCreating. - Add support for max-pool-size, min-pool-size, and multiplexing connection options; update logging accordingly. - VACUUM ANALYZE now runs per schema during scheduled optimization. - TruncateAllTablesAsync now truncates tables with schema qualification. - README updated with schema structure, new options, and multiplexing warnings. - CacheDecorator now calls async repository methods using .GetAwaiter().GetResult(), with documentation. - Lays groundwork for full async/await and multiplexing support in the database layer.
65 lines
2.4 KiB
C#
65 lines
2.4 KiB
C#
// <copyright file="IPeopleRepository.cs" company="PlaceholderCompany">
|
|
// Copyright (c) PlaceholderCompany. All rights reserved.
|
|
// </copyright>
|
|
|
|
#nullable disable
|
|
|
|
#pragma warning disable CS1591
|
|
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
using MediaBrowser.Controller.Entities;
|
|
|
|
namespace MediaBrowser.Controller.Persistence;
|
|
|
|
public interface IPeopleRepository
|
|
{
|
|
/// <summary>
|
|
/// Gets the people.
|
|
/// </summary>
|
|
/// <param name="filter">The query.</param>
|
|
/// <returns>The list of people matching the filter.</returns>
|
|
IReadOnlyList<PersonInfo> GetPeople(InternalPeopleQuery filter);
|
|
|
|
/// <summary>
|
|
/// Gets the people asynchronously.
|
|
/// </summary>
|
|
/// <param name="filter">The query.</param>
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
/// <returns>The list of people matching the filter.</returns>
|
|
Task<IReadOnlyList<PersonInfo>> GetPeopleAsync(InternalPeopleQuery filter, CancellationToken cancellationToken = default);
|
|
|
|
/// <summary>
|
|
/// Updates the people.
|
|
/// </summary>
|
|
/// <param name="itemId">The item identifier.</param>
|
|
/// <param name="people">The people.</param>
|
|
void UpdatePeople(Guid itemId, IReadOnlyList<PersonInfo> people);
|
|
|
|
/// <summary>
|
|
/// Updates the people asynchronously.
|
|
/// </summary>
|
|
/// <param name="itemId">The item identifier.</param>
|
|
/// <param name="people">The people.</param>
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
/// <returns>A task representing the asynchronous operation.</returns>
|
|
Task UpdatePeopleAsync(Guid itemId, IReadOnlyList<PersonInfo> people, CancellationToken cancellationToken = default);
|
|
|
|
/// <summary>
|
|
/// Gets the people names.
|
|
/// </summary>
|
|
/// <param name="filter">The query.</param>
|
|
/// <returns>The list of people names matching the filter.</returns>
|
|
IReadOnlyList<string> GetPeopleNames(InternalPeopleQuery filter);
|
|
|
|
/// <summary>
|
|
/// Gets the people names asynchronously.
|
|
/// </summary>
|
|
/// <param name="filter">The query.</param>
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
/// <returns>The list of people names matching the filter.</returns>
|
|
Task<IReadOnlyList<string>> GetPeopleNamesAsync(InternalPeopleQuery filter, CancellationToken cancellationToken = default);
|
|
}
|