Code optimization, function asynchrony

This commit is contained in:
2dust
2024-10-21 09:45:33 +08:00
parent 394b657fc9
commit a866017b4c
21 changed files with 518 additions and 514 deletions
@@ -29,7 +29,7 @@ namespace ServiceLib.Handler
{
await SQLiteHelper.Instance.ExecuteAsync($"delete from ProfileExItem where indexId not in ( select indexId from ProfileItem )");
_lstProfileEx = new(SQLiteHelper.Instance.Table<ProfileExItem>());
_lstProfileEx = new(await SQLiteHelper.Instance.TableAsync<ProfileExItem>().ToListAsync());
}
private void IndexIdEnqueue(string indexId)
@@ -45,7 +45,7 @@ namespace ServiceLib.Handler
var cnt = _queIndexIds.Count;
if (cnt > 0)
{
var lstExists = SQLiteHelper.Instance.Table<ProfileExItem>();
var lstExists = await SQLiteHelper.Instance.TableAsync<ProfileExItem>().ToListAsync();
List<ProfileExItem> lstInserts = [];
List<ProfileExItem> lstUpdates = [];