actually transfer some data to the row definition. Going to hook

this up to the sim in my env now to make sure we're getting data flow
in a reasonable way at this point.
afrisby
Sean Dague 2007-08-07 15:45:16 +00:00
parent cf3babd988
commit e4df1de58b
1 changed files with 21 additions and 3 deletions

View File

@ -64,11 +64,29 @@ namespace OpenSim.DataStore.SqliteStorage
} }
private void fillPrimRow(DataRow row, Primitive prim)
{
row["UUID"] = prim.UUID;
row["CreationDate"] = prim.CreationDate;
row["Name"] = prim.Name;
row["PositionX"] = prim.Pos.X;
row["PositionY"] = prim.Pos.Y;
row["PositionZ"] = prim.Pos.Z;
}
private void addPrim(Primitive prim) private void addPrim(Primitive prim)
{ {
DataTable prims = ds.Tables["prims"]; DataTable prims = ds.Tables["prims"];
DataTable shapes = ds.Tables["shapes"]; DataTable shapes = ds.Tables["shapes"];
DataRow row;
DataRow row = prims.Rows.Find(prim.UUID);
if (row == null) {
row = prims.NewRow();
fillPrimRow(row, prim);
prims.Rows.Add(row);
} else {
fillPrimRow(row, prim);
}
} }
public void StoreObject(SceneObject obj) public void StoreObject(SceneObject obj)