aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Data.MapperFactory
diff options
context:
space:
mode:
authorlbsa712008-03-30 21:04:45 +0000
committerlbsa712008-03-30 21:04:45 +0000
commitf52886f8f55ba6fd520cc3fffefd9a5607ad2a33 (patch)
tree484913aa8f0bde74cd42f8a7397f34390bb5bb00 /OpenSim/Framework/Data.MapperFactory
parent* Minor cleanup (diff)
downloadopensim-SC-f52886f8f55ba6fd520cc3fffefd9a5607ad2a33.zip
opensim-SC-f52886f8f55ba6fd520cc3fffefd9a5607ad2a33.tar.gz
opensim-SC-f52886f8f55ba6fd520cc3fffefd9a5607ad2a33.tar.bz2
opensim-SC-f52886f8f55ba6fd520cc3fffefd9a5607ad2a33.tar.xz
* 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
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 }