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.
24 lines
1.1 KiB
24 lines
1.1 KiB
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; } |
|
ILiteCollectionAsync<LocalModelFile> LocalModelFiles { get; } |
|
ILiteCollectionAsync<InferenceProjectEntry> InferenceProjects { get; } |
|
ILiteCollectionAsync<LocalImageFile> LocalImageFiles { 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); |
|
}
|
|
|