aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/SQLite/SQLiteInventoryStore.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Data/SQLite/SQLiteInventoryStore.cs')
-rw-r--r--OpenSim/Data/SQLite/SQLiteInventoryStore.cs34
1 files changed, 17 insertions, 17 deletions
diff --git a/OpenSim/Data/SQLite/SQLiteInventoryStore.cs b/OpenSim/Data/SQLite/SQLiteInventoryStore.cs
index 1ab971c..5acc5f2 100644
--- a/OpenSim/Data/SQLite/SQLiteInventoryStore.cs
+++ b/OpenSim/Data/SQLite/SQLiteInventoryStore.cs
@@ -106,22 +106,22 @@ namespace OpenSim.Data.SQLite
106 // new fields 106 // new fields
107 if (!Convert.IsDBNull(row["salePrice"])) 107 if (!Convert.IsDBNull(row["salePrice"]))
108 item.SalePrice = Convert.ToInt32(row["salePrice"]); 108 item.SalePrice = Convert.ToInt32(row["salePrice"]);
109 109
110 if (!Convert.IsDBNull(row["saleType"])) 110 if (!Convert.IsDBNull(row["saleType"]))
111 item.SaleType = Convert.ToByte(row["saleType"]); 111 item.SaleType = Convert.ToByte(row["saleType"]);
112 112
113 if (!Convert.IsDBNull(row["creationDate"])) 113 if (!Convert.IsDBNull(row["creationDate"]))
114 item.CreationDate = Convert.ToInt32(row["creationDate"]); 114 item.CreationDate = Convert.ToInt32(row["creationDate"]);
115 115
116 if (!Convert.IsDBNull(row["groupID"])) 116 if (!Convert.IsDBNull(row["groupID"]))
117 item.GroupID = new LLUUID((string)row["groupID"]); 117 item.GroupID = new LLUUID((string)row["groupID"]);
118 118
119 if (!Convert.IsDBNull(row["groupOwned"])) 119 if (!Convert.IsDBNull(row["groupOwned"]))
120 item.GroupOwned = Convert.ToBoolean(row["groupOwned"]); 120 item.GroupOwned = Convert.ToBoolean(row["groupOwned"]);
121 121
122 if (!Convert.IsDBNull(row["Flags"])) 122 if (!Convert.IsDBNull(row["Flags"]))
123 item.Flags = Convert.ToUInt32(row["Flags"]); 123 item.Flags = Convert.ToUInt32(row["Flags"]);
124 124
125 return item; 125 return item;
126 } 126 }
127 127
@@ -221,7 +221,7 @@ namespace OpenSim.Data.SQLite
221 { 221 {
222 if (add) 222 if (add)
223 m_log.ErrorFormat("[INVENTORY DB]: Interface Misuse: Attempting to Add inventory item that already exists: {0}", item.ID); 223 m_log.ErrorFormat("[INVENTORY DB]: Interface Misuse: Attempting to Add inventory item that already exists: {0}", item.ID);
224 224
225 fillItemRow(inventoryRow, item); 225 fillItemRow(inventoryRow, item);
226 } 226 }
227 invItemsDa.Update(ds, "inventoryitems"); 227 invItemsDa.Update(ds, "inventoryitems");
@@ -314,9 +314,9 @@ namespace OpenSim.Data.SQLite
314 314
315 // There should only ever be one root folder for a user. However, if there's more 315 // There should only ever be one root folder for a user. However, if there's more
316 // than one we'll simply use the first one rather than failing. It would be even 316 // than one we'll simply use the first one rather than failing. It would be even
317 // nicer to print some message to this effect, but this feels like it's too low a 317 // nicer to print some message to this effect, but this feels like it's too low a
318 // to put such a message out, and it's too minor right now to spare the time to 318 // to put such a message out, and it's too minor right now to spare the time to
319 // suitably refactor. 319 // suitably refactor.
320 if (folders.Count > 0) 320 if (folders.Count > 0)
321 { 321 {
322 return folders[0]; 322 return folders[0];
@@ -327,7 +327,7 @@ namespace OpenSim.Data.SQLite
327 } 327 }
328 328
329 /// <summary> 329 /// <summary>
330 /// Append a list of all the child folders of a parent folder 330 /// Append a list of all the child folders of a parent folder
331 /// </summary> 331 /// </summary>
332 /// <param name="folders">list where folders will be appended</param> 332 /// <param name="folders">list where folders will be appended</param>
333 /// <param name="parentID">ID of parent</param> 333 /// <param name="parentID">ID of parent</param>
@@ -435,7 +435,7 @@ namespace OpenSim.Data.SQLite
435 } 435 }
436 436
437 /// <summary> 437 /// <summary>
438 /// 438 ///
439 /// </summary> 439 /// </summary>
440 /// <param name="item"></param> 440 /// <param name="item"></param>
441 public void deleteInventoryItem(LLUUID itemID) 441 public void deleteInventoryItem(LLUUID itemID)
@@ -664,7 +664,7 @@ namespace OpenSim.Data.SQLite
664 { 664 {
665 string createInventoryItems = defineTable(createInventoryItemsTable()); 665 string createInventoryItems = defineTable(createInventoryItemsTable());
666 string createInventoryFolders = defineTable(createInventoryFoldersTable()); 666 string createInventoryFolders = defineTable(createInventoryFoldersTable());
667 667
668 SqliteCommand pcmd = new SqliteCommand(createInventoryItems, conn); 668 SqliteCommand pcmd = new SqliteCommand(createInventoryItems, conn);
669 SqliteCommand scmd = new SqliteCommand(createInventoryFolders, conn); 669 SqliteCommand scmd = new SqliteCommand(createInventoryFolders, conn);
670 670
@@ -697,7 +697,7 @@ namespace OpenSim.Data.SQLite
697 // Very clumsy way of checking whether we need to upgrade the database table version and then updating. Only 697 // Very clumsy way of checking whether we need to upgrade the database table version and then updating. Only
698 // putting up with this because this code should be blown away soon by nhibernate... 698 // putting up with this because this code should be blown away soon by nhibernate...
699 conn.Open(); 699 conn.Open();
700 700
701 SqliteCommand cmd; 701 SqliteCommand cmd;
702 try 702 try
703 { 703 {
@@ -707,7 +707,7 @@ namespace OpenSim.Data.SQLite
707 catch (SqliteSyntaxException) 707 catch (SqliteSyntaxException)
708 { 708 {
709 m_log.Info("[INVENTORY DB]: Upgrading sqlite inventory database to version 2"); 709 m_log.Info("[INVENTORY DB]: Upgrading sqlite inventory database to version 2");
710 710
711 cmd = new SqliteCommand("alter table inventoryitems add column salePrice integer default 99;", conn); 711 cmd = new SqliteCommand("alter table inventoryitems add column salePrice integer default 99;", conn);
712 cmd.ExecuteNonQuery(); 712 cmd.ExecuteNonQuery();
713 cmd = new SqliteCommand("alter table inventoryitems add column saleType integer default 0;", conn); 713 cmd = new SqliteCommand("alter table inventoryitems add column saleType integer default 0;", conn);
@@ -719,15 +719,15 @@ namespace OpenSim.Data.SQLite
719 cmd = new SqliteCommand("alter table inventoryitems add column groupOwned integer default 0;", conn); 719 cmd = new SqliteCommand("alter table inventoryitems add column groupOwned integer default 0;", conn);
720 cmd.ExecuteNonQuery(); 720 cmd.ExecuteNonQuery();
721 cmd = new SqliteCommand("alter table inventoryitems add column flags integer default 0;", conn); 721 cmd = new SqliteCommand("alter table inventoryitems add column flags integer default 0;", conn);
722 cmd.ExecuteNonQuery(); 722 cmd.ExecuteNonQuery();
723 723
724 pDa.Fill(tmpDS, "inventoryitems"); 724 pDa.Fill(tmpDS, "inventoryitems");
725 } 725 }
726 finally 726 finally
727 { 727 {
728 conn.Close(); 728 conn.Close();
729 } 729 }
730 730
731 foreach (DataColumn col in createInventoryItemsTable().Columns) 731 foreach (DataColumn col in createInventoryItemsTable().Columns)
732 { 732 {
733 if (! tmpDS.Tables["inventoryitems"].Columns.Contains(col.ColumnName)) 733 if (! tmpDS.Tables["inventoryitems"].Columns.Contains(col.ColumnName))