diff options
| author | Bond_009 <bond.009@outlook.com> | 2022-02-15 22:27:38 +0100 |
|---|---|---|
| committer | Bond_009 <bond.009@outlook.com> | 2022-02-15 22:27:38 +0100 |
| commit | 23ea14aa274a6f3ba440a31a6a5b315bd8fcc094 (patch) | |
| tree | 8ee347c73ce7976defc932c5cb35f939b0271bd9 /MediaBrowser.Controller/Persistence | |
| parent | 5825a0572bdcd11afad283f1e62c07f5e2c61c06 (diff) | |
Clean up SqliteItemRepository
* remove dead code
* reduce allocations
Diffstat (limited to 'MediaBrowser.Controller/Persistence')
| -rw-r--r-- | MediaBrowser.Controller/Persistence/IItemRepository.cs | 23 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Persistence/IRepository.cs | 16 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Persistence/IUserDataRepository.cs | 3 |
3 files changed, 3 insertions, 39 deletions
diff --git a/MediaBrowser.Controller/Persistence/IItemRepository.cs b/MediaBrowser.Controller/Persistence/IItemRepository.cs index f7cc7841f..24f7b5cd3 100644 --- a/MediaBrowser.Controller/Persistence/IItemRepository.cs +++ b/MediaBrowser.Controller/Persistence/IItemRepository.cs @@ -15,16 +15,9 @@ namespace MediaBrowser.Controller.Persistence /// <summary> /// Provides an interface to implement an Item repository. /// </summary> - public interface IItemRepository : IRepository + public interface IItemRepository : IDisposable { /// <summary> - /// Saves an item. - /// </summary> - /// <param name="item">The item.</param> - /// <param name="cancellationToken">The cancellation token.</param> - void SaveItem(BaseItem item, CancellationToken cancellationToken); - - /// <summary> /// Deletes the item. /// </summary> /// <param name="id">The identifier.</param> @@ -99,13 +92,6 @@ namespace MediaBrowser.Controller.Persistence void SaveMediaAttachments(Guid id, IReadOnlyList<MediaAttachment> attachments, CancellationToken cancellationToken); /// <summary> - /// Gets the item ids. - /// </summary> - /// <param name="query">The query.</param> - /// <returns>IEnumerable<Guid>.</returns> - QueryResult<Guid> GetItemIds(InternalItemsQuery query); - - /// <summary> /// Gets the items. /// </summary> /// <param name="query">The query.</param> @@ -141,13 +127,6 @@ namespace MediaBrowser.Controller.Persistence List<string> GetPeopleNames(InternalPeopleQuery query); /// <summary> - /// Gets the item ids with path. - /// </summary> - /// <param name="query">The query.</param> - /// <returns>QueryResult<Tuple<Guid, System.String>>.</returns> - List<Tuple<Guid, string>> GetItemIdsWithPath(InternalItemsQuery query); - - /// <summary> /// Gets the item list. /// </summary> /// <param name="query">The query.</param> diff --git a/MediaBrowser.Controller/Persistence/IRepository.cs b/MediaBrowser.Controller/Persistence/IRepository.cs deleted file mode 100644 index 42f285076..000000000 --- a/MediaBrowser.Controller/Persistence/IRepository.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; - -namespace MediaBrowser.Controller.Persistence -{ - /// <summary> - /// Provides a base interface for all the repository interfaces. - /// </summary> - public interface IRepository : IDisposable - { - /// <summary> - /// Gets the name of the repository. - /// </summary> - /// <value>The name.</value> - string Name { get; } - } -} diff --git a/MediaBrowser.Controller/Persistence/IUserDataRepository.cs b/MediaBrowser.Controller/Persistence/IUserDataRepository.cs index c43acfb6d..f2fb2826a 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 /// <summary> /// Provides an interface to implement a UserData repository. /// </summary> - public interface IUserDataRepository : IRepository + public interface IUserDataRepository : IDisposable { /// <summary> /// Saves the user data. |
