aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/SQLiteNG/SQLiteInventoryStore.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2010-04-23 18:56:50 +0100
committerJustin Clark-Casey (justincc)2010-04-23 18:56:50 +0100
commite84cc2f9db9e03a45f9fa315cf598dd5ef83b7ef (patch)
tree4c07c2f614640afd4dfc3a1bf2594ad369837908 /OpenSim/Data/SQLiteNG/SQLiteInventoryStore.cs
parentDuplicate OpenSim.Data.SQLite into OpenSim.Data.SQLiteNG. SQLiteNG will shor... (diff)
downloadopensim-SC_OLD-e84cc2f9db9e03a45f9fa315cf598dd5ef83b7ef.zip
opensim-SC_OLD-e84cc2f9db9e03a45f9fa315cf598dd5ef83b7ef.tar.gz
opensim-SC_OLD-e84cc2f9db9e03a45f9fa315cf598dd5ef83b7ef.tar.bz2
opensim-SC_OLD-e84cc2f9db9e03a45f9fa315cf598dd5ef83b7ef.tar.xz
Change SQLiteNG to work with mono 2.6 and above using the Mono.Data.Sqlite.dll
Include the library so that Windows builds correctly It appears that Windows is okay with either SQLite or SQLiteNG Incorporate the latest fixes made by Diva to OpenSim.Data.SQLite
Diffstat (limited to 'OpenSim/Data/SQLiteNG/SQLiteInventoryStore.cs')
-rw-r--r--OpenSim/Data/SQLiteNG/SQLiteInventoryStore.cs13
1 files changed, 12 insertions, 1 deletions
diff --git a/OpenSim/Data/SQLiteNG/SQLiteInventoryStore.cs b/OpenSim/Data/SQLiteNG/SQLiteInventoryStore.cs
index a5e0517..ece2495 100644
--- a/OpenSim/Data/SQLiteNG/SQLiteInventoryStore.cs
+++ b/OpenSim/Data/SQLiteNG/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
@@ -98,11 +98,13 @@ namespace OpenSim.Data.SQLite
98 ds.Tables.Add(createInventoryFoldersTable()); 98 ds.Tables.Add(createInventoryFoldersTable());
99 invFoldersDa.Fill(ds.Tables["inventoryfolders"]); 99 invFoldersDa.Fill(ds.Tables["inventoryfolders"]);
100 setupFoldersCommands(invFoldersDa, conn); 100 setupFoldersCommands(invFoldersDa, conn);
101 CreateDataSetMapping(invFoldersDa, "inventoryfolders");
101 m_log.Info("[INVENTORY DB]: Populated Inventory Folders Definitions"); 102 m_log.Info("[INVENTORY DB]: Populated Inventory Folders Definitions");
102 103
103 ds.Tables.Add(createInventoryItemsTable()); 104 ds.Tables.Add(createInventoryItemsTable());
104 invItemsDa.Fill(ds.Tables["inventoryitems"]); 105 invItemsDa.Fill(ds.Tables["inventoryitems"]);
105 setupItemsCommands(invItemsDa, conn); 106 setupItemsCommands(invItemsDa, conn);
107 CreateDataSetMapping(invItemsDa, "inventoryitems");
106 m_log.Info("[INVENTORY DB]: Populated Inventory Items Definitions"); 108 m_log.Info("[INVENTORY DB]: Populated Inventory Items Definitions");
107 109
108 ds.AcceptChanges(); 110 ds.AcceptChanges();
@@ -728,6 +730,15 @@ namespace OpenSim.Data.SQLite
728 * 730 *
729 **********************************************************************/ 731 **********************************************************************/
730 732
733 protected void CreateDataSetMapping(IDataAdapter da, string tableName)
734 {
735 ITableMapping dbMapping = da.TableMappings.Add(tableName, tableName);
736 foreach (DataColumn col in ds.Tables[tableName].Columns)
737 {
738 dbMapping.ColumnMappings.Add(col.ColumnName, col.ColumnName);
739 }
740 }
741
731 /// <summary> 742 /// <summary>
732 /// Create the "inventoryitems" table 743 /// Create the "inventoryitems" table
733 /// </summary> 744 /// </summary>