mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 17:32:42 +08:00
Committed patch from Lulurun to fix Mantis 817. Thanks Lulurun
This commit is contained in:
30
OpenSim/Framework/Data.MapperFactory/DataMapperFactory.cs
Normal file
30
OpenSim/Framework/Data.MapperFactory/DataMapperFactory.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Framework.Data;
|
||||
using OpenSim.Framework.Data.Base;
|
||||
using OpenSim.Framework.Data.MySQLMapper;
|
||||
|
||||
namespace OpenSim.Framework.Data.MapperFactory
|
||||
{
|
||||
public class DataMapperFactory
|
||||
{
|
||||
public enum MAPPER_TYPE {
|
||||
MYSQL,
|
||||
};
|
||||
|
||||
public DataMapperFactory() {
|
||||
|
||||
}
|
||||
|
||||
static public BaseDatabaseConnector GetDataBaseMapper(MAPPER_TYPE type, string connectionString)
|
||||
{
|
||||
switch (type) {
|
||||
case MAPPER_TYPE.MYSQL:
|
||||
return new MySQLDatabaseMapper(connectionString);
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user