diff options
author | Sean Dague | 2007-08-09 21:07:53 +0000 |
---|---|---|
committer | Sean Dague | 2007-08-09 21:07:53 +0000 |
commit | a2a8de816b3baffb78f8a681430b54bb72b598cd (patch) | |
tree | 8e0138de0e958660dec3e84a64f7bec1655fb6f9 /OpenSim | |
parent | utility functions to convert from rows to new objects. untested (diff) | |
download | opensim-SC-a2a8de816b3baffb78f8a681430b54bb72b598cd.zip opensim-SC-a2a8de816b3baffb78f8a681430b54bb72b598cd.tar.gz opensim-SC-a2a8de816b3baffb78f8a681430b54bb72b598cd.tar.bz2 opensim-SC-a2a8de816b3baffb78f8a681430b54bb72b598cd.tar.xz |
completely untest load prims from db code. Testing shortly
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs | 16 |
1 files changed, 16 insertions, 0 deletions
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 | |||
457 | { | 457 | { |
458 | List<SceneObjectGroup> retvals = new List<SceneObjectGroup>(); | 458 | List<SceneObjectGroup> retvals = new List<SceneObjectGroup>(); |
459 | 459 | ||
460 | DataTable prims = ds.Tables["prims"]; | ||
461 | DataTable shapes = ds.Tables["primshapes"]; | ||
462 | |||
463 | // This only supports 1 prim per SceneObjectGroup. Need to fix later | ||
464 | foreach (DataRow primRow in prims.Rows) | ||
465 | { | ||
466 | SceneObjectGroup group = new SceneObjectGroup(); | ||
467 | SceneObjectPart prim = buildPrim(primRow); | ||
468 | DataRow shapeRow = shapes.Rows.Find(prim.UUID); | ||
469 | if (shapeRow != null) { | ||
470 | prim.Shape = buildShape(shapeRow); | ||
471 | } | ||
472 | group.Children.Add(prim.UUID, prim); | ||
473 | retvals.Add(group); | ||
474 | } | ||
475 | |||
460 | MainLog.Instance.Verbose("DATASTORE", "Sqlite - LoadObjects found " + " objects"); | 476 | MainLog.Instance.Verbose("DATASTORE", "Sqlite - LoadObjects found " + " objects"); |
461 | 477 | ||
462 | return retvals; | 478 | return retvals; |