From a2a8de816b3baffb78f8a681430b54bb72b598cd Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Thu, 9 Aug 2007 21:07:53 +0000 Subject: completely untest load prims from db code. Testing shortly --- .../OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs b/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs index 6e8c22d..dcf06fe 100644 --- a/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs +++ b/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs @@ -457,6 +457,22 @@ namespace OpenSim.DataStore.MonoSqliteStorage { List retvals = new List(); + DataTable prims = ds.Tables["prims"]; + DataTable shapes = ds.Tables["primshapes"]; + + // This only supports 1 prim per SceneObjectGroup. Need to fix later + foreach (DataRow primRow in prims.Rows) + { + SceneObjectGroup group = new SceneObjectGroup(); + SceneObjectPart prim = buildPrim(primRow); + DataRow shapeRow = shapes.Rows.Find(prim.UUID); + if (shapeRow != null) { + prim.Shape = buildShape(shapeRow); + } + group.Children.Add(prim.UUID, prim); + retvals.Add(group); + } + MainLog.Instance.Verbose("DATASTORE", "Sqlite - LoadObjects found " + " objects"); return retvals; -- cgit v1.1