diff options
author | Justin Clark-Casey (justincc) | 2010-04-23 18:56:50 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2010-04-30 19:04:32 +0100 |
commit | 7ce0ec874a31d2567bee43afa0cdec24e002dc1d (patch) | |
tree | fb592cd73d75a445a32a88042120fc52d68d8a16 /OpenSim/Data/SQLiteNG/SQLiteInventoryStore.cs | |
parent | Duplicate OpenSim.Data.SQLite into OpenSim.Data.SQLiteNG. SQLiteNG will shor... (diff) | |
download | opensim-SC-7ce0ec874a31d2567bee43afa0cdec24e002dc1d.zip opensim-SC-7ce0ec874a31d2567bee43afa0cdec24e002dc1d.tar.gz opensim-SC-7ce0ec874a31d2567bee43afa0cdec24e002dc1d.tar.bz2 opensim-SC-7ce0ec874a31d2567bee43afa0cdec24e002dc1d.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 '')
-rw-r--r-- | OpenSim/Data/SQLiteNG/SQLiteInventoryStore.cs | 13 |
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; | |||
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 | ||
@@ -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> |