journal/Journal.Core/Repositories/IFragmentRepository.cs
Jacob Schmidt f86ac5e4b9 Remove dead code, fix duplicated connection logic, eliminate fake async
- Delete unused FileFragmentRepository.cs
- DatabaseSessionService delegates to JournalDatabaseService for
  OpenEncryptedConnection/EnsureSchema instead of duplicating logic
- Make IJournalDatabaseService expose OpenEncryptedConnection and
  EnsureSchema as public
- Convert entire fragment chain from fake async (Task.FromResult
  wrappers) to synchronous: IFragmentRepository, SqliteFragmentRepository,
  InMemoryFragmentRepository, IFragmentService, FragmentService,
  Entry.cs dispatch, and SmokeTests

Co-Authored-By: Warp <agent@warp.dev>
2026-02-23 22:10:36 -06:00

16 lines
551 B
C#

using Journal.Core.Models;
namespace Journal.Core.Repositories;
public interface IFragmentRepository
{
List<Fragment> GetAll();
Fragment? GetById(Guid id);
void Add(Fragment fragment);
bool Remove(Guid id);
bool Update(Guid id, string? type = null, string? description = null, IEnumerable<string>? tags = null, DateTimeOffset? time = null);
List<Fragment> GetByTag(string tag);
List<Fragment> GetByType(string type);
List<Fragment> Search(string? type = null, string? tag = null, DateTimeOffset? timeAfter = null);
}