using LiteDB.Async; using StabilityMatrix.Core.Models.Api; using StabilityMatrix.Core.Models.Database; namespace StabilityMatrix.Core.Database; public interface ILiteDbContext : IDisposable { LiteDatabaseAsync Database { get; } ILiteCollectionAsync CivitModels { get; } ILiteCollectionAsync CivitModelVersions { get; } ILiteCollectionAsync CivitModelQueryCache { get; } ILiteCollectionAsync LocalModelFiles { get; } ILiteCollectionAsync InferenceProjects { get; } Task<(CivitModel?, CivitModelVersion?)> FindCivitModelFromFileHashAsync(string hashBlake3); Task UpsertCivitModelAsync(CivitModel civitModel); Task UpsertCivitModelAsync(IEnumerable civitModels); Task UpsertCivitModelQueryCacheEntryAsync(CivitModelQueryCacheEntry entry); Task GetGithubCacheEntry(string cacheKey); Task UpsertGithubCacheEntry(GithubCacheEntry cacheEntry); }