mirror of
https://github.com/opensim/opensim.git
synced 2026-08-04 16:22:50 +08:00
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
This commit is contained in:
@@ -30,7 +30,7 @@ using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Reflection;
|
||||
using log4net;
|
||||
using Mono.Data.SqliteClient;
|
||||
using Mono.Data.Sqlite;
|
||||
using OpenMetaverse;
|
||||
using OpenSim.Framework;
|
||||
|
||||
@@ -98,11 +98,13 @@ namespace OpenSim.Data.SQLite
|
||||
ds.Tables.Add(createInventoryFoldersTable());
|
||||
invFoldersDa.Fill(ds.Tables["inventoryfolders"]);
|
||||
setupFoldersCommands(invFoldersDa, conn);
|
||||
CreateDataSetMapping(invFoldersDa, "inventoryfolders");
|
||||
m_log.Info("[INVENTORY DB]: Populated Inventory Folders Definitions");
|
||||
|
||||
ds.Tables.Add(createInventoryItemsTable());
|
||||
invItemsDa.Fill(ds.Tables["inventoryitems"]);
|
||||
setupItemsCommands(invItemsDa, conn);
|
||||
CreateDataSetMapping(invItemsDa, "inventoryitems");
|
||||
m_log.Info("[INVENTORY DB]: Populated Inventory Items Definitions");
|
||||
|
||||
ds.AcceptChanges();
|
||||
@@ -728,6 +730,15 @@ namespace OpenSim.Data.SQLite
|
||||
*
|
||||
**********************************************************************/
|
||||
|
||||
protected void CreateDataSetMapping(IDataAdapter da, string tableName)
|
||||
{
|
||||
ITableMapping dbMapping = da.TableMappings.Add(tableName, tableName);
|
||||
foreach (DataColumn col in ds.Tables[tableName].Columns)
|
||||
{
|
||||
dbMapping.ColumnMappings.Add(col.ColumnName, col.ColumnName);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create the "inventoryitems" table
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user