aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MapperFactory/DataMapperFactory.cs
diff options
context:
space:
mode:
authorSean Dague2008-04-02 15:24:31 +0000
committerSean Dague2008-04-02 15:24:31 +0000
commitc52c68f314c67c76c7181a6d0828f476290fbd66 (patch)
tree66ab347502892902a096fa985f31b25738eb1381 /OpenSim/Data/MapperFactory/DataMapperFactory.cs
parentreorganizing namespaces to put all the Data stuff into it's own namespace (diff)
downloadopensim-SC_OLD-c52c68f314c67c76c7181a6d0828f476290fbd66.zip
opensim-SC_OLD-c52c68f314c67c76c7181a6d0828f476290fbd66.tar.gz
opensim-SC_OLD-c52c68f314c67c76c7181a6d0828f476290fbd66.tar.bz2
opensim-SC_OLD-c52c68f314c67c76c7181a6d0828f476290fbd66.tar.xz
whole lot more moving
Diffstat (limited to 'OpenSim/Data/MapperFactory/DataMapperFactory.cs')
-rw-r--r--OpenSim/Data/MapperFactory/DataMapperFactory.cs27
1 files changed, 27 insertions, 0 deletions
diff --git a/OpenSim/Data/MapperFactory/DataMapperFactory.cs b/OpenSim/Data/MapperFactory/DataMapperFactory.cs
new file mode 100644
index 0000000..8995b9e
--- /dev/null
+++ b/OpenSim/Data/MapperFactory/DataMapperFactory.cs
@@ -0,0 +1,27 @@
1using System;
2using OpenSim.Framework.Data.Base;
3using OpenSim.Framework.Data.MSSQLMapper;
4using OpenSim.Framework.Data.MySQLMapper;
5
6namespace OpenSim.Framework.Data.MapperFactory
7{
8 public class DataMapperFactory
9 {
10 public enum MAPPER_TYPE {
11 MySQL,
12 MSSQL,
13 };
14
15 static public BaseDatabaseConnector GetDataBaseMapper(MAPPER_TYPE type, string connectionString)
16 {
17 switch (type) {
18 case MAPPER_TYPE.MySQL:
19 return new MySQLDatabaseMapper(connectionString);
20 case MAPPER_TYPE.MSSQL:
21 return new MSSQLDatabaseMapper(connectionString);
22 default:
23 throw new ArgumentException("Unknown Database Mapper type [" + type + "].");
24 }
25 }
26 }
27}