Browse Source

Sqlite backup database

pull/31/head
sunkaixuan 2 years ago
parent
commit
397cf8b81c
  1. 2
      Src/Asp.NetCore2/SqlSugar/Realization/Sqlite/DbMaintenance/SqliteDbMaintenance.cs

2
Src/Asp.NetCore2/SqlSugar/Realization/Sqlite/DbMaintenance/SqliteDbMaintenance.cs

@ -472,7 +472,7 @@ namespace SqlSugar
}
public override bool BackupDataBase(string databaseName, string fullFileName)
{
Check.ThrowNotSupportedException("MySql BackupDataBase NotSupported");
this.Context.Ado.ExecuteCommandAsync($"PRAGMA main.page_size=1024; PRAGMA main.locking_mode=EXCLUSIVE; PRAGMA main.cache_size=5000; PRAGMA main.synchronous=NORMAL; PRAGMA main.journal_mode=WAL; VACUUM INTO '{fullFileName.ToSqlFilter()}'");
return false;
}
private List<T> GetListOrCache<T>(string cacheKey, string sql)

Loading…
Cancel
Save