aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Data/OpenSimDatabaseMapper.cs
diff options
context:
space:
mode:
authorlbsa712008-01-14 22:34:19 +0000
committerlbsa712008-01-14 22:34:19 +0000
commit6d751411b7f996c486052c8cbbdbe1e186cebd9f (patch)
treeeb7a0a101695e85cefb3a8f0ed540d402caedc63 /OpenSim/Framework/Data/OpenSimDatabaseMapper.cs
parentmy Exists check was slow and wrong. This fixes issues people (diff)
downloadopensim-SC_OLD-6d751411b7f996c486052c8cbbdbe1e186cebd9f.zip
opensim-SC_OLD-6d751411b7f996c486052c8cbbdbe1e186cebd9f.tar.gz
opensim-SC_OLD-6d751411b7f996c486052c8cbbdbe1e186cebd9f.tar.bz2
opensim-SC_OLD-6d751411b7f996c486052c8cbbdbe1e186cebd9f.tar.xz
* Added specialization of DatabaseMapper, DataReader and ObjectFieldMapper to support LLVector3, LLQuaternion and LLUUID
* Added PrimitiveBaseShapeTableMapper to show how it's done NOTE: Nothing actually works yet - this code should be considered more of educational value until it's all wired together
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/Data/OpenSimDatabaseMapper.cs23
1 files changed, 23 insertions, 0 deletions
diff --git a/OpenSim/Framework/Data/OpenSimDatabaseMapper.cs b/OpenSim/Framework/Data/OpenSimDatabaseMapper.cs
new file mode 100644
index 0000000..2001110
--- /dev/null
+++ b/OpenSim/Framework/Data/OpenSimDatabaseMapper.cs
@@ -0,0 +1,23 @@
1using System.Data.Common;
2using libsecondlife;
3using TribalMedia.Framework.Data;
4
5namespace OpenSim.Framework.Data
6{
7 public abstract class OpenSimDatabaseMapper : DatabaseMapper
8 {
9 public OpenSimDatabaseMapper(string connectionString) : base(connectionString)
10 {
11 }
12
13 public override object ConvertToDbType(object value)
14 {
15 if (value is LLUUID)
16 {
17 return ((LLUUID) value).UUID.ToString();
18 }
19
20 return base.ConvertToDbType(value);
21 }
22 }
23}