aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/SQLite/SQLiteInventoryStore.cs
diff options
context:
space:
mode:
authorMelanie2010-06-07 05:23:52 +0100
committerMelanie2010-06-07 05:23:52 +0100
commitcc2622660bad93ef46844476e434b6640a3a3643 (patch)
treeaa0b0f36bcbfb9bd44fe396e1cd98f8de26f2255 /OpenSim/Data/SQLite/SQLiteInventoryStore.cs
parentGosh, fixing another nullref issue in cmGetAvatarList. I deserve spanks. (diff)
parentRevert "commit code which stops full updates being fired multiple times when ... (diff)
downloadopensim-SC-cc2622660bad93ef46844476e434b6640a3a3643.zip
opensim-SC-cc2622660bad93ef46844476e434b6640a3a3643.tar.gz
opensim-SC-cc2622660bad93ef46844476e434b6640a3a3643.tar.bz2
opensim-SC-cc2622660bad93ef46844476e434b6640a3a3643.tar.xz
Merge branch '0.6.9-post-fixes' into careminster
Diffstat (limited to 'OpenSim/Data/SQLite/SQLiteInventoryStore.cs')
-rw-r--r--OpenSim/Data/SQLite/SQLiteInventoryStore.cs15
1 files changed, 13 insertions, 2 deletions
diff --git a/OpenSim/Data/SQLite/SQLiteInventoryStore.cs b/OpenSim/Data/SQLite/SQLiteInventoryStore.cs
index 64591fd..9ce21b1 100644
--- a/OpenSim/Data/SQLite/SQLiteInventoryStore.cs
+++ b/OpenSim/Data/SQLite/SQLiteInventoryStore.cs
@@ -30,7 +30,7 @@ using System.Collections.Generic;
30using System.Data; 30using System.Data;
31using System.Reflection; 31using System.Reflection;
32using log4net; 32using log4net;
33using Mono.Data.SqliteClient; 33using Mono.Data.Sqlite;
34using OpenMetaverse; 34using OpenMetaverse;
35using OpenSim.Framework; 35using OpenSim.Framework;
36 36
@@ -88,15 +88,17 @@ namespace OpenSim.Data.SQLite
88 invFoldersDa = new SqliteDataAdapter(foldersSelectCmd); 88 invFoldersDa = new SqliteDataAdapter(foldersSelectCmd);
89 89
90 ds = new DataSet(); 90 ds = new DataSet();
91 91
92 ds.Tables.Add(createInventoryFoldersTable()); 92 ds.Tables.Add(createInventoryFoldersTable());
93 invFoldersDa.Fill(ds.Tables["inventoryfolders"]); 93 invFoldersDa.Fill(ds.Tables["inventoryfolders"]);
94 setupFoldersCommands(invFoldersDa, conn); 94 setupFoldersCommands(invFoldersDa, conn);
95 CreateDataSetMapping(invFoldersDa, "inventoryfolders");
95 m_log.Info("[INVENTORY DB]: Populated Inventory Folders Definitions"); 96 m_log.Info("[INVENTORY DB]: Populated Inventory Folders Definitions");
96 97
97 ds.Tables.Add(createInventoryItemsTable()); 98 ds.Tables.Add(createInventoryItemsTable());
98 invItemsDa.Fill(ds.Tables["inventoryitems"]); 99 invItemsDa.Fill(ds.Tables["inventoryitems"]);
99 setupItemsCommands(invItemsDa, conn); 100 setupItemsCommands(invItemsDa, conn);
101 CreateDataSetMapping(invItemsDa, "inventoryitems");
100 m_log.Info("[INVENTORY DB]: Populated Inventory Items Definitions"); 102 m_log.Info("[INVENTORY DB]: Populated Inventory Items Definitions");
101 103
102 ds.AcceptChanges(); 104 ds.AcceptChanges();
@@ -721,6 +723,15 @@ namespace OpenSim.Data.SQLite
721 * 723 *
722 **********************************************************************/ 724 **********************************************************************/
723 725
726 protected void CreateDataSetMapping(IDataAdapter da, string tableName)
727 {
728 ITableMapping dbMapping = da.TableMappings.Add(tableName, tableName);
729 foreach (DataColumn col in ds.Tables[tableName].Columns)
730 {
731 dbMapping.ColumnMappings.Add(col.ColumnName, col.ColumnName);
732 }
733 }
734
724 /// <summary> 735 /// <summary>
725 /// Create the "inventoryitems" table 736 /// Create the "inventoryitems" table
726 /// </summary> 737 /// </summary>