aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Data.MapperFactory
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/Data.MapperFactory')
-rw-r--r--OpenSim/Framework/Data.MapperFactory/DataMapperFactory.cs13
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 @@
1using System; 1using System;
2using System.Collections.Generic;
3using OpenSim.Framework;
4using OpenSim.Framework.Data;
5using OpenSim.Framework.Data.Base; 2using OpenSim.Framework.Data.Base;
3using OpenSim.Framework.Data.MSSQLMapper;
6using OpenSim.Framework.Data.MySQLMapper; 4using OpenSim.Framework.Data.MySQLMapper;
7 5
8namespace OpenSim.Framework.Data.MapperFactory 6namespace 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 }