aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorSean Dague2007-08-08 19:35:16 +0000
committerSean Dague2007-08-08 19:35:16 +0000
commita5f8d012b74252b515796eb62fa7b422ae1b3f8e (patch)
treea40203230f43479912d8abc70490a29b1f3f2b1f /OpenSim/Region
parentHopefully improved texture downloading (including the speed at which they dow... (diff)
downloadopensim-SC_OLD-a5f8d012b74252b515796eb62fa7b422ae1b3f8e.zip
opensim-SC_OLD-a5f8d012b74252b515796eb62fa7b422ae1b3f8e.tar.gz
opensim-SC_OLD-a5f8d012b74252b515796eb62fa7b422ae1b3f8e.tar.bz2
opensim-SC_OLD-a5f8d012b74252b515796eb62fa7b422ae1b3f8e.tar.xz
This chunk of code actually properly saves out some parameters of
current objects to disk, and does updates on those objects usefully. It is now functional enough to mean that moving to new objects is just lots of plug and chug.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Storage/OpenSim.DataStore.Sqlite/SqliteDataStore.cs15
1 files changed, 9 insertions, 6 deletions
diff --git a/OpenSim/Region/Storage/OpenSim.DataStore.Sqlite/SqliteDataStore.cs b/OpenSim/Region/Storage/OpenSim.DataStore.Sqlite/SqliteDataStore.cs
index b3d8f14..5c17620 100644
--- a/OpenSim/Region/Storage/OpenSim.DataStore.Sqlite/SqliteDataStore.cs
+++ b/OpenSim/Region/Storage/OpenSim.DataStore.Sqlite/SqliteDataStore.cs
@@ -44,13 +44,15 @@ namespace OpenSim.DataStore.SqliteStorage
44 44
45 // We fill the data set, now we've got copies in memory for the information 45 // We fill the data set, now we've got copies in memory for the information
46 // TODO: see if the linkage actually holds. 46 // TODO: see if the linkage actually holds.
47 primDa.FillSchema(ds, SchemaType.Source, "PrimSchema"); 47 // primDa.FillSchema(ds, SchemaType.Source, "PrimSchema");
48 primDa.Fill(ds, "prims"); 48 primDa.Fill(ds, "prims");
49 ds.AcceptChanges();
50
49 DataTable prims = ds.Tables["prims"]; 51 DataTable prims = ds.Tables["prims"];
50 prims.PrimaryKey = new DataColumn[] { prims.Columns["UUID"] }; 52 prims.PrimaryKey = new DataColumn[] { prims.Columns["UUID"] };
51 setupPrimCommands(primDa, conn); 53 setupPrimCommands(primDa, conn);
52 54
53 shapeDa.FillSchema(ds, SchemaType.Source, "ShapeSchema"); 55 // shapeDa.FillSchema(ds, SchemaType.Source, "ShapeSchema");
54 shapeDa.Fill(ds, "primshapes"); 56 shapeDa.Fill(ds, "primshapes");
55 57
56 return; 58 return;
@@ -76,7 +78,7 @@ namespace OpenSim.DataStore.SqliteStorage
76 SqliteParameter PositionZ = createSqliteParameter("PositionZ", DbType.Double); 78 SqliteParameter PositionZ = createSqliteParameter("PositionZ", DbType.Double);
77 79
78 80
79 SqliteCommand delete = new SqliteCommand("delete from prims where UUID=:UUID"); 81 SqliteCommand delete = new SqliteCommand("delete from prims where UUID = :UUID");
80 delete.Connection = conn; 82 delete.Connection = conn;
81 83
82 SqliteCommand insert = 84 SqliteCommand insert =
@@ -86,9 +88,9 @@ namespace OpenSim.DataStore.SqliteStorage
86 insert.Connection = conn; 88 insert.Connection = conn;
87 89
88 SqliteCommand update = 90 SqliteCommand update =
89 new SqliteCommand("update prims" + 91 new SqliteCommand("update prims set " +
90 "set CreationDate=:CreationDate, Name=:Name, PositionX=:PositionX, " + 92 "UUID = :UUID, CreationDate = :CreationDate, Name = :Name, PositionX = :PositionX, " +
91 "PositionY=:PositionY, PositionZ=:PositionZ where UUID=:UUID"); 93 "PositionY = :PositionY, PositionZ = :PositionZ where UUID = :UUID");
92 update.Connection = conn; 94 update.Connection = conn;
93 95
94 delete.Parameters.Add(UUID); 96 delete.Parameters.Add(UUID);
@@ -159,6 +161,7 @@ namespace OpenSim.DataStore.SqliteStorage
159 addPrim(prim); 161 addPrim(prim);
160 } 162 }
161 163
164 MainLog.Instance.Verbose("Attempting to do update....");
162 primDa.Update(ds, "prims"); 165 primDa.Update(ds, "prims");
163 MainLog.Instance.Verbose("Dump of prims:", ds.GetXml()); 166 MainLog.Instance.Verbose("Dump of prims:", ds.GetXml());
164 } 167 }