diff options
Diffstat (limited to 'OpenSim/Data/SQLite/SQLiteInventoryStore.cs')
-rw-r--r-- | OpenSim/Data/SQLite/SQLiteInventoryStore.cs | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/OpenSim/Data/SQLite/SQLiteInventoryStore.cs b/OpenSim/Data/SQLite/SQLiteInventoryStore.cs index 64591fd..0149838 100644 --- a/OpenSim/Data/SQLite/SQLiteInventoryStore.cs +++ b/OpenSim/Data/SQLite/SQLiteInventoryStore.cs | |||
@@ -30,7 +30,7 @@ using System.Collections.Generic; | |||
30 | using System.Data; | 30 | using System.Data; |
31 | using System.Reflection; | 31 | using System.Reflection; |
32 | using log4net; | 32 | using log4net; |
33 | using Mono.Data.SqliteClient; | 33 | using Mono.Data.Sqlite; |
34 | using OpenMetaverse; | 34 | using OpenMetaverse; |
35 | using OpenSim.Framework; | 35 | using OpenSim.Framework; |
36 | 36 | ||
@@ -89,6 +89,7 @@ namespace OpenSim.Data.SQLite | |||
89 | 89 | ||
90 | ds = new DataSet(); | 90 | ds = new DataSet(); |
91 | 91 | ||
92 | <<<<<<< HEAD:OpenSim/Data/SQLite/SQLiteInventoryStore.cs | ||
92 | ds.Tables.Add(createInventoryFoldersTable()); | 93 | ds.Tables.Add(createInventoryFoldersTable()); |
93 | invFoldersDa.Fill(ds.Tables["inventoryfolders"]); | 94 | invFoldersDa.Fill(ds.Tables["inventoryfolders"]); |
94 | setupFoldersCommands(invFoldersDa, conn); | 95 | setupFoldersCommands(invFoldersDa, conn); |
@@ -98,6 +99,19 @@ namespace OpenSim.Data.SQLite | |||
98 | invItemsDa.Fill(ds.Tables["inventoryitems"]); | 99 | invItemsDa.Fill(ds.Tables["inventoryitems"]); |
99 | setupItemsCommands(invItemsDa, conn); | 100 | setupItemsCommands(invItemsDa, conn); |
100 | m_log.Info("[INVENTORY DB]: Populated Inventory Items Definitions"); | 101 | m_log.Info("[INVENTORY DB]: Populated Inventory Items Definitions"); |
102 | ======= | ||
103 | ds.Tables.Add(createInventoryFoldersTable()); | ||
104 | invFoldersDa.Fill(ds.Tables["inventoryfolders"]); | ||
105 | setupFoldersCommands(invFoldersDa, conn); | ||
106 | CreateDataSetMapping(invFoldersDa, "inventoryfolders"); | ||
107 | m_log.Info("[INVENTORY DB]: Populated Inventory Folders Definitions"); | ||
108 | |||
109 | ds.Tables.Add(createInventoryItemsTable()); | ||
110 | invItemsDa.Fill(ds.Tables["inventoryitems"]); | ||
111 | setupItemsCommands(invItemsDa, conn); | ||
112 | CreateDataSetMapping(invItemsDa, "inventoryitems"); | ||
113 | m_log.Info("[INVENTORY DB]: Populated Inventory Items Definitions"); | ||
114 | >>>>>>> cc67de5... rename SQLiteNG to SQLite and SQLite to SQLiteLegacy:OpenSim/Data/SQLite/SQLiteInventoryStore.cs | ||
101 | 115 | ||
102 | ds.AcceptChanges(); | 116 | ds.AcceptChanges(); |
103 | } | 117 | } |
@@ -721,6 +735,15 @@ namespace OpenSim.Data.SQLite | |||
721 | * | 735 | * |
722 | **********************************************************************/ | 736 | **********************************************************************/ |
723 | 737 | ||
738 | protected void CreateDataSetMapping(IDataAdapter da, string tableName) | ||
739 | { | ||
740 | ITableMapping dbMapping = da.TableMappings.Add(tableName, tableName); | ||
741 | foreach (DataColumn col in ds.Tables[tableName].Columns) | ||
742 | { | ||
743 | dbMapping.ColumnMappings.Add(col.ColumnName, col.ColumnName); | ||
744 | } | ||
745 | } | ||
746 | |||
724 | /// <summary> | 747 | /// <summary> |
725 | /// Create the "inventoryitems" table | 748 | /// Create the "inventoryitems" table |
726 | /// </summary> | 749 | /// </summary> |