From 23ea14aa274a6f3ba440a31a6a5b315bd8fcc094 Mon Sep 17 00:00:00 2001 From: Bond_009 Date: Tue, 15 Feb 2022 22:27:38 +0100 Subject: Clean up SqliteItemRepository * remove dead code * reduce allocations --- .../Persistence/IItemRepository.cs | 23 +--------------------- MediaBrowser.Controller/Persistence/IRepository.cs | 16 --------------- .../Persistence/IUserDataRepository.cs | 3 ++- 3 files changed, 3 insertions(+), 39 deletions(-) delete mode 100644 MediaBrowser.Controller/Persistence/IRepository.cs (limited to 'MediaBrowser.Controller') diff --git a/MediaBrowser.Controller/Persistence/IItemRepository.cs b/MediaBrowser.Controller/Persistence/IItemRepository.cs index f7cc7841fb..24f7b5cd36 100644 --- a/MediaBrowser.Controller/Persistence/IItemRepository.cs +++ b/MediaBrowser.Controller/Persistence/IItemRepository.cs @@ -15,15 +15,8 @@ namespace MediaBrowser.Controller.Persistence /// /// Provides an interface to implement an Item repository. /// - public interface IItemRepository : IRepository + public interface IItemRepository : IDisposable { - /// - /// Saves an item. - /// - /// The item. - /// The cancellation token. - void SaveItem(BaseItem item, CancellationToken cancellationToken); - /// /// Deletes the item. /// @@ -98,13 +91,6 @@ namespace MediaBrowser.Controller.Persistence /// The cancellation token. void SaveMediaAttachments(Guid id, IReadOnlyList attachments, CancellationToken cancellationToken); - /// - /// Gets the item ids. - /// - /// The query. - /// IEnumerable<Guid>. - QueryResult GetItemIds(InternalItemsQuery query); - /// /// Gets the items. /// @@ -140,13 +126,6 @@ namespace MediaBrowser.Controller.Persistence /// List<System.String>. List GetPeopleNames(InternalPeopleQuery query); - /// - /// Gets the item ids with path. - /// - /// The query. - /// QueryResult<Tuple<Guid, System.String>>. - List> GetItemIdsWithPath(InternalItemsQuery query); - /// /// Gets the item list. /// diff --git a/MediaBrowser.Controller/Persistence/IRepository.cs b/MediaBrowser.Controller/Persistence/IRepository.cs deleted file mode 100644 index 42f2850762..0000000000 --- a/MediaBrowser.Controller/Persistence/IRepository.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; - -namespace MediaBrowser.Controller.Persistence -{ - /// - /// Provides a base interface for all the repository interfaces. - /// - public interface IRepository : IDisposable - { - /// - /// Gets the name of the repository. - /// - /// The name. - string Name { get; } - } -} diff --git a/MediaBrowser.Controller/Persistence/IUserDataRepository.cs b/MediaBrowser.Controller/Persistence/IUserDataRepository.cs index c43acfb6de..f2fb2826a0 100644 --- a/MediaBrowser.Controller/Persistence/IUserDataRepository.cs +++ b/MediaBrowser.Controller/Persistence/IUserDataRepository.cs @@ -1,5 +1,6 @@ #nullable disable +using System; using System.Collections.Generic; using System.Threading; using MediaBrowser.Controller.Entities; @@ -9,7 +10,7 @@ namespace MediaBrowser.Controller.Persistence /// /// Provides an interface to implement a UserData repository. /// - public interface IUserDataRepository : IRepository + public interface IUserDataRepository : IDisposable { /// /// Saves the user data. -- cgit v1.2.3