mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-11 15:56:05 -07:00
Started on #483
This commit is contained in:
parent
ac02d24d65
commit
367ca391b1
7 changed files with 160 additions and 0 deletions
|
@ -327,5 +327,22 @@ namespace PlexRequests.Store.Repository
|
|||
throw;
|
||||
}
|
||||
}
|
||||
public async Task DeleteAllAsync(string tableName)
|
||||
{
|
||||
try
|
||||
{
|
||||
ResetCache();
|
||||
using (var db = Config.DbConnection())
|
||||
{
|
||||
db.Open();
|
||||
await db.ExecuteAsync($"delete from {tableName}");
|
||||
}
|
||||
}
|
||||
catch (SqliteException e) when (e.ErrorCode == SQLiteErrorCode.Corrupt)
|
||||
{
|
||||
Log.Fatal(CorruptMessage);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue