mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-24 05:03:34 -04:00
Simplify DB backup for SQLite
This commit is contained in:
parent
33d9ca82a0
commit
a6d32942e2
@ -89,7 +89,7 @@ namespace MCGalaxy {
|
||||
if (p == null) return true;
|
||||
LevelAccessController visit, build;
|
||||
Level lvl = null;
|
||||
LevelConfig cfg = GetConfig(map, out lvl);
|
||||
LevelConfig cfg = GetConfig(map, out lvl);
|
||||
|
||||
if (lvl != null) {
|
||||
visit = lvl.VisitAccess;
|
||||
|
@ -88,9 +88,8 @@ namespace MCGalaxy {
|
||||
}
|
||||
sql.WriteLine(");");
|
||||
} else {
|
||||
using (DataTable tableSQL = Database.Fill("SELECT sql FROM sqlite_master WHERE tbl_name LIKE @0" +
|
||||
" AND type = 'table' AND name NOT LIKE 'sqlite_%'" +
|
||||
" ORDER BY substr(type,2,1), name", tableName))
|
||||
const string syntax = "SELECT sql FROM sqlite_master WHERE tbl_name = @0 AND type = 'table'";
|
||||
using (DataTable tableSQL = Database.Fill(syntax + Database.Backend.CaselessWhereSuffix, tableName))
|
||||
{
|
||||
//just print out the data in the table.
|
||||
foreach (DataRow row in tableSQL.Rows) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user