aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/SQLite/SQLiteInventoryStore.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2010-04-30 17:45:00 +0100
committerJustin Clark-Casey (justincc)2010-04-30 19:28:28 +0100
commit56fe4c24b8c67ec3b6a5a897c35ab19507bd1077 (patch)
tree8feccd68058c70da1b96d8b6e804aa4afa6dc723 /OpenSim/Data/SQLite/SQLiteInventoryStore.cs
parentadd Mono.Data.Sqlite.dll (diff)
downloadopensim-SC_OLD-56fe4c24b8c67ec3b6a5a897c35ab19507bd1077.zip
opensim-SC_OLD-56fe4c24b8c67ec3b6a5a897c35ab19507bd1077.tar.gz
opensim-SC_OLD-56fe4c24b8c67ec3b6a5a897c35ab19507bd1077.tar.bz2
opensim-SC_OLD-56fe4c24b8c67ec3b6a5a897c35ab19507bd1077.tar.xz
rename SQLiteNG to SQLite and SQLite to SQLiteLegacy this seems the least evil way forward since mono 2.6 and later will see increasing usage, and this only works with what was
SQLiteNG MAC USERS WILL NEED TO CHANGE REFERENCES TO "OpenSim.Data.SQLite.dll" to "OpenSim.Data.SQLiteLegacy.dll" in OpenSim.ini and config-include/StandaloneCommon.ini (if using standalone) See the OpenSim.ini.example and StandaloneCommon.ini.example files for more details This commit also temporarily changes unsigned ParentEstateID values in the OpenSim.Data.Tests to signed temporarily, since the new plugin enforces creation of signed fields in the database (which is what the SQL actually specifies). And change data columns in sqlite is a pita.
Diffstat (limited to 'OpenSim/Data/SQLite/SQLiteInventoryStore.cs')
-rw-r--r--OpenSim/Data/SQLite/SQLiteInventoryStore.cs25
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;
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
@@ -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>