diff options
author | lbsa71 | 2008-03-30 21:04:45 +0000 |
---|---|---|
committer | lbsa71 | 2008-03-30 21:04:45 +0000 |
commit | f52886f8f55ba6fd520cc3fffefd9a5607ad2a33 (patch) | |
tree | 484913aa8f0bde74cd42f8a7397f34390bb5bb00 /OpenSim/Framework/Data.MapperFactory | |
parent | * Minor cleanup (diff) | |
download | opensim-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.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 | } |