aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MySQL/MySQLInventoryData.cs
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-04-30 19:28:36 +0000
committerJustin Clarke Casey2008-04-30 19:28:36 +0000
commit8ed9e578968539ff991ffa8215e715c0e4c3be5d (patch)
tree36a5de69d383f9219d53cb17783331d97a911e3c /OpenSim/Data/MySQL/MySQLInventoryData.cs
parent* Change new inventory groupID field to 36 rather than 63 (diff)
downloadopensim-SC_OLD-8ed9e578968539ff991ffa8215e715c0e4c3be5d.zip
opensim-SC_OLD-8ed9e578968539ff991ffa8215e715c0e4c3be5d.tar.gz
opensim-SC_OLD-8ed9e578968539ff991ffa8215e715c0e4c3be5d.tar.bz2
opensim-SC_OLD-8ed9e578968539ff991ffa8215e715c0e4c3be5d.tar.xz
* Add a scratch implementation of the new inventory fields to the mssql database adapter
* I don't use mssql so this may not work, corrections (in the form of patches) are welcome. * Unlike mysql, mssql requires manual updating of existing tables here (which should mean just adding the new fields manually)
Diffstat (limited to '')
-rw-r--r--OpenSim/Data/MySQL/MySQLInventoryData.cs12
1 files changed, 8 insertions, 4 deletions
diff --git a/OpenSim/Data/MySQL/MySQLInventoryData.cs b/OpenSim/Data/MySQL/MySQLInventoryData.cs
index 944c2f5..23d2ea5 100644
--- a/OpenSim/Data/MySQL/MySQLInventoryData.cs
+++ b/OpenSim/Data/MySQL/MySQLInventoryData.cs
@@ -333,8 +333,6 @@ namespace OpenSim.Data.MySQL
333 item.Creator = new LLUUID((string) reader["creatorID"]); 333 item.Creator = new LLUUID((string) reader["creatorID"]);
334 item.BasePermissions = (uint) reader["inventoryBasePermissions"]; 334 item.BasePermissions = (uint) reader["inventoryBasePermissions"];
335 item.EveryOnePermissions = (uint) reader["inventoryEveryOnePermissions"]; 335 item.EveryOnePermissions = (uint) reader["inventoryEveryOnePermissions"];
336
337 // new fields
338 item.SalePrice = (int) reader["salePrice"]; 336 item.SalePrice = (int) reader["salePrice"];
339 item.SaleType = Convert.ToByte(reader["saleType"]); 337 item.SaleType = Convert.ToByte(reader["saleType"]);
340 item.CreationDate = (int) reader["creationDate"]; 338 item.CreationDate = (int) reader["creationDate"];
@@ -452,9 +450,15 @@ namespace OpenSim.Data.MySQL
452 public void addInventoryItem(InventoryItemBase item) 450 public void addInventoryItem(InventoryItemBase item)
453 { 451 {
454 string sql = 452 string sql =
455 "REPLACE INTO inventoryitems (inventoryID, assetID, assetType, parentFolderID, avatarID, inventoryName, inventoryDescription, inventoryNextPermissions, inventoryCurrentPermissions, invType, creatorID, inventoryBasePermissions, inventoryEveryOnePermissions, salePrice, saleType, creationDate, groupID, groupOwned, flags) VALUES "; 453 "REPLACE INTO inventoryitems (inventoryID, assetID, assetType, parentFolderID, avatarID, inventoryName"
454 + ", inventoryDescription, inventoryNextPermissions, inventoryCurrentPermissions, invType"
455 + ", creatorID, inventoryBasePermissions, inventoryEveryOnePermissions, salePrice, saleType"
456 + ", creationDate, groupID, groupOwned, flags) VALUES ";
456 sql += 457 sql +=
457 "(?inventoryID, ?assetID, ?assetType, ?parentFolderID, ?avatarID, ?inventoryName, ?inventoryDescription, ?inventoryNextPermissions, ?inventoryCurrentPermissions, ?invType, ?creatorID, ?inventoryBasePermissions, ?inventoryEveryOnePermissions, ?salePrice, ?saleType, ?creationDate, ?groupID, ?groupOwned, ?flags)"; 458 "(?inventoryID, ?assetID, ?assetType, ?parentFolderID, ?avatarID, ?inventoryName, ?inventoryDescription"
459 + ", ?inventoryNextPermissions, ?inventoryCurrentPermissions, ?invType, ?creatorID"
460 + ", ?inventoryBasePermissions, ?inventoryEveryOnePermissions, ?salePrice, ?saleType, ?creationDate"
461 + ", ?groupID, ?groupOwned, ?flags)";
458 462
459 try 463 try
460 { 464 {