You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
914 B
22 lines
914 B
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<CivitModel> CivitModels { get; } |
|
ILiteCollectionAsync<CivitModelVersion> CivitModelVersions { get; } |
|
ILiteCollectionAsync<CivitModelQueryCacheEntry> CivitModelQueryCache { get; } |
|
|
|
|
|
Task<(CivitModel?, CivitModelVersion?)> FindCivitModelFromFileHashAsync(string hashBlake3); |
|
Task<bool> UpsertCivitModelAsync(CivitModel civitModel); |
|
Task<bool> UpsertCivitModelAsync(IEnumerable<CivitModel> civitModels); |
|
Task<bool> UpsertCivitModelQueryCacheEntryAsync(CivitModelQueryCacheEntry entry); |
|
Task<GithubCacheEntry?> GetGithubCacheEntry(string cacheKey); |
|
Task<bool> UpsertGithubCacheEntry(GithubCacheEntry cacheEntry); |
|
}
|
|
|