completely untest load prims from db code. Testing shortly

afrisby
Sean Dague 2007-08-09 21:07:53 +00:00
parent ad2133e5cf
commit a2a8de816b
1 changed files with 16 additions and 0 deletions

View File

@ -457,6 +457,22 @@ namespace OpenSim.DataStore.MonoSqliteStorage
{
List<SceneObjectGroup> retvals = new List<SceneObjectGroup>();
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;