mirror of
https://github.com/opensim/opensim.git
synced 2026-08-01 22:26:09 +08:00
* Added competely untested MSSQLMapper
* Added the new mapper to the mapper factory * Made choice of mapper configurable * This means, in hteory, that we can persist avatar appearance on MSSQL as well
This commit is contained in:
@@ -220,14 +220,22 @@ namespace OpenSim.Region.Modules.AvatarFactory
|
||||
try
|
||||
{
|
||||
m_enablePersist = source.Configs["Startup"].GetBoolean("appearance_persist", false);
|
||||
m_connectionString = source.Configs["Startup"].GetString("appearance_connection_string", "");
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
if (m_enablePersist)
|
||||
{
|
||||
m_databaseMapper = DataMapperFactory.GetDataBaseMapper(DataMapperFactory.MAPPER_TYPE.MYSQL, m_connectionString);
|
||||
m_connectionString = source.Configs["Startup"].GetString("appearance_connection_string", "");
|
||||
|
||||
string mapperTypeStr = source.Configs["Startup"].GetString("appearance_database", "MYSQL");
|
||||
|
||||
DataMapperFactory.MAPPER_TYPE mapperType =
|
||||
(DataMapperFactory.MAPPER_TYPE)
|
||||
Enum.Parse(typeof (DataMapperFactory.MAPPER_TYPE), mapperTypeStr);
|
||||
|
||||
m_databaseMapper = DataMapperFactory.GetDataBaseMapper(mapperType, m_connectionString);
|
||||
|
||||
m_appearanceMapper = new AppearanceTableMapper(m_databaseMapper, "AvatarAppearance");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user