diff options
Diffstat (limited to 'OpenSim/Framework/Data.MapperFactory')
-rw-r--r-- | OpenSim/Framework/Data.MapperFactory/DataMapperFactory.cs | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/OpenSim/Framework/Data.MapperFactory/DataMapperFactory.cs b/OpenSim/Framework/Data.MapperFactory/DataMapperFactory.cs index 37b933c..8995b9e 100644 --- a/OpenSim/Framework/Data.MapperFactory/DataMapperFactory.cs +++ b/OpenSim/Framework/Data.MapperFactory/DataMapperFactory.cs | |||
@@ -1,8 +1,6 @@ | |||
1 | using System; | 1 | using System; |
2 | using System.Collections.Generic; | ||
3 | using OpenSim.Framework; | ||
4 | using OpenSim.Framework.Data; | ||
5 | using OpenSim.Framework.Data.Base; | 2 | using OpenSim.Framework.Data.Base; |
3 | using OpenSim.Framework.Data.MSSQLMapper; | ||
6 | using OpenSim.Framework.Data.MySQLMapper; | 4 | using OpenSim.Framework.Data.MySQLMapper; |
7 | 5 | ||
8 | namespace OpenSim.Framework.Data.MapperFactory | 6 | namespace OpenSim.Framework.Data.MapperFactory |
@@ -10,16 +8,19 @@ namespace OpenSim.Framework.Data.MapperFactory | |||
10 | public class DataMapperFactory | 8 | public class DataMapperFactory |
11 | { | 9 | { |
12 | public enum MAPPER_TYPE { | 10 | public enum MAPPER_TYPE { |
13 | MYSQL, | 11 | MySQL, |
12 | MSSQL, | ||
14 | }; | 13 | }; |
15 | 14 | ||
16 | static public BaseDatabaseConnector GetDataBaseMapper(MAPPER_TYPE type, string connectionString) | 15 | static public BaseDatabaseConnector GetDataBaseMapper(MAPPER_TYPE type, string connectionString) |
17 | { | 16 | { |
18 | switch (type) { | 17 | switch (type) { |
19 | case MAPPER_TYPE.MYSQL: | 18 | case MAPPER_TYPE.MySQL: |
20 | return new MySQLDatabaseMapper(connectionString); | 19 | return new MySQLDatabaseMapper(connectionString); |
20 | case MAPPER_TYPE.MSSQL: | ||
21 | return new MSSQLDatabaseMapper(connectionString); | ||
21 | default: | 22 | default: |
22 | return null; | 23 | throw new ArgumentException("Unknown Database Mapper type [" + type + "]."); |
23 | } | 24 | } |
24 | } | 25 | } |
25 | } | 26 | } |