diff options
Diffstat (limited to 'OpenSim/Framework/Data.SQLite')
-rw-r--r-- | OpenSim/Framework/Data.SQLite/SQLiteRegionData.cs | 84 |
1 files changed, 43 insertions, 41 deletions
diff --git a/OpenSim/Framework/Data.SQLite/SQLiteRegionData.cs b/OpenSim/Framework/Data.SQLite/SQLiteRegionData.cs index 1fd5c47..94c05e1 100644 --- a/OpenSim/Framework/Data.SQLite/SQLiteRegionData.cs +++ b/OpenSim/Framework/Data.SQLite/SQLiteRegionData.cs | |||
@@ -205,6 +205,8 @@ namespace OpenSim.Framework.Data.SQLite | |||
205 | 205 | ||
206 | public void RemoveObject(LLUUID obj, LLUUID regionUUID) | 206 | public void RemoveObject(LLUUID obj, LLUUID regionUUID) |
207 | { | 207 | { |
208 | MainLog.Instance.Verbose("DATASTORE", "Removing obj: {0} from region: {1}", obj.UUID, regionUUID); | ||
209 | |||
208 | DataTable prims = ds.Tables["prims"]; | 210 | DataTable prims = ds.Tables["prims"]; |
209 | DataTable shapes = ds.Tables["primshapes"]; | 211 | DataTable shapes = ds.Tables["primshapes"]; |
210 | DataTable items = ds.Tables["primitems"]; | 212 | DataTable items = ds.Tables["primitems"]; |
@@ -229,9 +231,9 @@ namespace OpenSim.Framework.Data.SQLite | |||
229 | String sql = String.Format("primID = '{0}'", uuid); | 231 | String sql = String.Format("primID = '{0}'", uuid); |
230 | DataRow[] itemRows = items.Select(sql); | 232 | DataRow[] itemRows = items.Select(sql); |
231 | 233 | ||
232 | foreach (DataRow itemsRow in itemRows) | 234 | foreach (DataRow itemRow in itemRows) |
233 | { | 235 | { |
234 | itemsRow.Delete(); | 236 | itemRow.Delete(); |
235 | } | 237 | } |
236 | } | 238 | } |
237 | 239 | ||
@@ -351,7 +353,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
351 | TaskInventoryItem item = buildItem(row); | 353 | TaskInventoryItem item = buildItem(row); |
352 | inventory.Add(item); | 354 | inventory.Add(item); |
353 | 355 | ||
354 | MainLog.Instance.Verbose("DATASTORE", "Restored item {0}, {1}", item.name, item.item_id); | 356 | MainLog.Instance.Verbose("DATASTORE", "Restored item {0}, {1}", item.Name, item.ItemID); |
355 | } | 357 | } |
356 | 358 | ||
357 | prim.AddInventoryItems(inventory); | 359 | prim.AddInventoryItems(inventory); |
@@ -360,7 +362,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
360 | // every item). This data should really be stored in the prim table itself. | 362 | // every item). This data should really be stored in the prim table itself. |
361 | if (dbItemRows.Length > 0) | 363 | if (dbItemRows.Length > 0) |
362 | { | 364 | { |
363 | prim.FolderID = inventory[0].parent_id; | 365 | prim.FolderID = inventory[0].ParentID; |
364 | } | 366 | } |
365 | } | 367 | } |
366 | 368 | ||
@@ -889,27 +891,27 @@ namespace OpenSim.Framework.Data.SQLite | |||
889 | { | 891 | { |
890 | TaskInventoryItem taskItem = new TaskInventoryItem(); | 892 | TaskInventoryItem taskItem = new TaskInventoryItem(); |
891 | 893 | ||
892 | taskItem.item_id = new LLUUID((String)row["itemID"]); | 894 | taskItem.ItemID = new LLUUID((String)row["itemID"]); |
893 | taskItem.ParentPartID = new LLUUID((String)row["primID"]); | 895 | taskItem.ParentPartID = new LLUUID((String)row["primID"]); |
894 | taskItem.asset_id = new LLUUID((String)row["assetID"]); | 896 | taskItem.AssetID = new LLUUID((String)row["assetID"]); |
895 | taskItem.parent_id = new LLUUID((String)row["parentFolderID"]); | 897 | taskItem.ParentID = new LLUUID((String)row["parentFolderID"]); |
896 | 898 | ||
897 | taskItem.inv_type = Convert.ToInt32(row["invType"]); | 899 | taskItem.InvType = Convert.ToInt32(row["invType"]); |
898 | taskItem.type = Convert.ToInt32(row["assetType"]); | 900 | taskItem.Type = Convert.ToInt32(row["assetType"]); |
899 | 901 | ||
900 | taskItem.name = (String)row["name"]; | 902 | taskItem.Name = (String)row["name"]; |
901 | taskItem.desc = (String)row["description"]; | 903 | taskItem.Description = (String)row["description"]; |
902 | taskItem.creation_date = Convert.ToUInt32(row["creationDate"]); | 904 | taskItem.CreationDate = Convert.ToUInt32(row["creationDate"]); |
903 | taskItem.creator_id = new LLUUID((String)row["creatorID"]); | 905 | taskItem.CreatorID = new LLUUID((String)row["creatorID"]); |
904 | taskItem.owner_id = new LLUUID((String)row["ownerID"]); | 906 | taskItem.OwnerID = new LLUUID((String)row["ownerID"]); |
905 | taskItem.last_owner_id = new LLUUID((String)row["lastOwnerID"]); | 907 | taskItem.LastOwnerID = new LLUUID((String)row["lastOwnerID"]); |
906 | taskItem.group_id = new LLUUID((String)row["groupID"]); | 908 | taskItem.GroupID = new LLUUID((String)row["groupID"]); |
907 | 909 | ||
908 | taskItem.next_owner_mask = Convert.ToUInt32(row["nextPermissions"]); | 910 | taskItem.NextOwnerMask = Convert.ToUInt32(row["nextPermissions"]); |
909 | taskItem.owner_mask = Convert.ToUInt32(row["currentPermissions"]); | 911 | taskItem.OwnerMask = Convert.ToUInt32(row["currentPermissions"]); |
910 | taskItem.base_mask = Convert.ToUInt32(row["basePermissions"]); | 912 | taskItem.BaseMask = Convert.ToUInt32(row["basePermissions"]); |
911 | taskItem.everyone_mask = Convert.ToUInt32(row["everyonePermissions"]); | 913 | taskItem.EveryoneMask = Convert.ToUInt32(row["everyonePermissions"]); |
912 | taskItem.group_mask = Convert.ToUInt32(row["groupPermissions"]); | 914 | taskItem.GroupMask = Convert.ToUInt32(row["groupPermissions"]); |
913 | 915 | ||
914 | return taskItem; | 916 | return taskItem; |
915 | } | 917 | } |
@@ -1059,26 +1061,26 @@ namespace OpenSim.Framework.Data.SQLite | |||
1059 | 1061 | ||
1060 | private void fillItemRow(DataRow row, TaskInventoryItem taskItem) | 1062 | private void fillItemRow(DataRow row, TaskInventoryItem taskItem) |
1061 | { | 1063 | { |
1062 | row["itemID"] = taskItem.item_id; | 1064 | row["itemID"] = taskItem.ItemID; |
1063 | row["primID"] = taskItem.ParentPartID; | 1065 | row["primID"] = taskItem.ParentPartID; |
1064 | row["assetID"] = taskItem.asset_id; | 1066 | row["assetID"] = taskItem.AssetID; |
1065 | row["parentFolderID"] = taskItem.parent_id; | 1067 | row["parentFolderID"] = taskItem.ParentID; |
1066 | 1068 | ||
1067 | row["invType"] = taskItem.inv_type; | 1069 | row["invType"] = taskItem.InvType; |
1068 | row["assetType"] = taskItem.type; | 1070 | row["assetType"] = taskItem.Type; |
1069 | 1071 | ||
1070 | row["name"] = taskItem.name; | 1072 | row["name"] = taskItem.Name; |
1071 | row["description"] = taskItem.desc; | 1073 | row["description"] = taskItem.Description; |
1072 | row["creationDate"] = taskItem.creation_date; | 1074 | row["creationDate"] = taskItem.CreationDate; |
1073 | row["creatorID"] = taskItem.creator_id; | 1075 | row["creatorID"] = taskItem.CreatorID; |
1074 | row["ownerID"] = taskItem.owner_id; | 1076 | row["ownerID"] = taskItem.OwnerID; |
1075 | row["lastOwnerID"] = taskItem.last_owner_id; | 1077 | row["lastOwnerID"] = taskItem.LastOwnerID; |
1076 | row["groupID"] = taskItem.group_id; | 1078 | row["groupID"] = taskItem.GroupID; |
1077 | row["nextPermissions"] = taskItem.next_owner_mask; | 1079 | row["nextPermissions"] = taskItem.NextOwnerMask; |
1078 | row["currentPermissions"] = taskItem.owner_mask; | 1080 | row["currentPermissions"] = taskItem.OwnerMask; |
1079 | row["basePermissions"] = taskItem.base_mask; | 1081 | row["basePermissions"] = taskItem.BaseMask; |
1080 | row["everyonePermissions"] = taskItem.everyone_mask; | 1082 | row["everyonePermissions"] = taskItem.EveryoneMask; |
1081 | row["groupPermissions"] = taskItem.group_mask; | 1083 | row["groupPermissions"] = taskItem.GroupMask; |
1082 | } | 1084 | } |
1083 | 1085 | ||
1084 | private void fillLandRow(DataRow row, LandData land, LLUUID regionUUID) | 1086 | private void fillLandRow(DataRow row, LandData land, LLUUID regionUUID) |
@@ -1311,8 +1313,8 @@ namespace OpenSim.Framework.Data.SQLite | |||
1311 | { | 1313 | { |
1312 | MainLog.Instance.Verbose( | 1314 | MainLog.Instance.Verbose( |
1313 | "DATASTORE", | 1315 | "DATASTORE", |
1314 | "Adding item {0}, {1} to prim ID {1}", | 1316 | "Adding item {0}, {1} to prim ID {2}", |
1315 | newItem.name, newItem.item_id, newItem.ParentPartID); | 1317 | newItem.Name, newItem.ItemID, newItem.ParentPartID); |
1316 | 1318 | ||
1317 | DataRow newItemRow = dbItems.NewRow(); | 1319 | DataRow newItemRow = dbItems.NewRow(); |
1318 | fillItemRow(newItemRow, newItem); | 1320 | fillItemRow(newItemRow, newItem); |