aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/SQLite/SQLiteInventoryStore.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2010-06-04 18:00:48 +0100
committerJustin Clark-Casey (justincc)2010-06-04 18:00:48 +0100
commit2f6d401db13b31c6cac7450266dade6e678c8aa6 (patch)
tree8ae3f924dfecbea30835d0172ac5464c6b8325b6 /OpenSim/Data/SQLite/SQLiteInventoryStore.cs
parentRevert "Next OSG test. Don't remove app domains if they contain running threa... (diff)
parentswitch 0.6.9 flavour to release (diff)
downloadopensim-SC-2f6d401db13b31c6cac7450266dade6e678c8aa6.zip
opensim-SC-2f6d401db13b31c6cac7450266dade6e678c8aa6.tar.gz
opensim-SC-2f6d401db13b31c6cac7450266dade6e678c8aa6.tar.bz2
opensim-SC-2f6d401db13b31c6cac7450266dade6e678c8aa6.tar.xz
Merge remote branch 'origin/0.6.9' into 0.6.9-post-fixes
This chiefly brings in the new sqlite adaptor and renames the old one to SQLiteLegacy Existing configuratios should continue to work without changes unless you are using Mac OSX and mono 2.6 or later, in which case you will need to enable SQLiteLegacy instead. Please se the instructions in OpenSim.ini.example and the relevant config/include .ini files Conflicts: OpenSim/Framework/Servers/VersionInfo.cs OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
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>