Commit 2542c75e authored by 潘栩锋's avatar 潘栩锋 🚴

优化 SQLite 按时间删除数据库时,顺便压缩数据库

parent aec000a7
......@@ -258,7 +258,10 @@ namespace SQLite
if (sqls.Count == 0)
return;
sqliteHelper.QueryTran(sqls);
if (sqliteHelper.QueryTran(sqls)) {
//数据库压缩
sqliteHelper.ExecuteNonQuery("VACUUM");
}
}
......@@ -387,6 +390,7 @@ namespace SQLite
//把sqls里面为空的全部删除
if (sqliteHelper2.QueryTran(sqls)) {
//数据库压缩
sqliteHelper2.ExecuteNonQuery("VACUUM");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment