aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorlbsa712008-01-15 10:15:39 +0000
committerlbsa712008-01-15 10:15:39 +0000
commit47c65295236560b0c58c1797ce2ad19418fa2b94 (patch)
tree1aacd2f02d5c6a585a9fc61e0b3c57ae6beaf1d9 /OpenSim
parent* Delinking doesn't leave invisible physical objects behind anymore (diff)
downloadopensim-SC-47c65295236560b0c58c1797ce2ad19418fa2b94.zip
opensim-SC-47c65295236560b0c58c1797ce2ad19418fa2b94.tar.gz
opensim-SC-47c65295236560b0c58c1797ce2ad19418fa2b94.tar.bz2
opensim-SC-47c65295236560b0c58c1797ce2ad19418fa2b94.tar.xz
* Some morw work on specializing the database framework for OpenSim
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Framework/Data/OpenSimObjectFieldMapper.cs3
-rw-r--r--OpenSim/Framework/Data/OpenSimTableMapper.cs17
-rw-r--r--OpenSim/Framework/Data/PrimitiveBaseShapeTableMapper.cs4
3 files changed, 21 insertions, 3 deletions
diff --git a/OpenSim/Framework/Data/OpenSimObjectFieldMapper.cs b/OpenSim/Framework/Data/OpenSimObjectFieldMapper.cs
index b718fe4..851ebcd 100644
--- a/OpenSim/Framework/Data/OpenSimObjectFieldMapper.cs
+++ b/OpenSim/Framework/Data/OpenSimObjectFieldMapper.cs
@@ -1,5 +1,6 @@
1using System; 1using System;
2using System.Collections.Generic; 2using System.Collections.Generic;
3using System.Data.Common;
3using System.Text; 4using System.Text;
4using libsecondlife; 5using libsecondlife;
5using TribalMedia.Framework.Data; 6using TribalMedia.Framework.Data;
@@ -15,7 +16,7 @@ namespace OpenSim.Framework.Data
15 { 16 {
16 } 17 }
17 18
18 public override void ExpandField<TObj>(TObj obj, System.Data.Common.DbCommand command, List<string> fieldNames) 19 public override void ExpandField<TObj>(TObj obj, DbCommand command, List<string> fieldNames)
19 { 20 {
20 string fieldName = FieldName; 21 string fieldName = FieldName;
21 object value = GetParamValue(obj); 22 object value = GetParamValue(obj);
diff --git a/OpenSim/Framework/Data/OpenSimTableMapper.cs b/OpenSim/Framework/Data/OpenSimTableMapper.cs
new file mode 100644
index 0000000..c72f523
--- /dev/null
+++ b/OpenSim/Framework/Data/OpenSimTableMapper.cs
@@ -0,0 +1,17 @@
1using System.Data;
2using TribalMedia.Framework.Data;
3
4namespace OpenSim.Framework.Data
5{
6 public abstract class OpenSimTableMapper<TRowMapper, TPrimaryKey> : ObjectTableMapper<TRowMapper, TPrimaryKey>
7 {
8 public OpenSimTableMapper(DatabaseMapper database, string tableName) : base(database, tableName)
9 {
10 }
11
12 protected override DataReader CreateReader(IDataReader reader)
13 {
14 return new OpenSimDataReader(reader);
15 }
16 }
17}
diff --git a/OpenSim/Framework/Data/PrimitiveBaseShapeTableMapper.cs b/OpenSim/Framework/Data/PrimitiveBaseShapeTableMapper.cs
index ab0115e..c8098ab 100644
--- a/OpenSim/Framework/Data/PrimitiveBaseShapeTableMapper.cs
+++ b/OpenSim/Framework/Data/PrimitiveBaseShapeTableMapper.cs
@@ -14,7 +14,7 @@ namespace OpenSim.Framework.Data
14 } 14 }
15 } 15 }
16 16
17 public class PrimitiveBaseShapeTableMapper : ObjectTableMapper<PrimitiveBaseShapeRowMapper, Guid> 17 public class PrimitiveBaseShapeTableMapper : OpenSimTableMapper<PrimitiveBaseShapeRowMapper, Guid>
18 { 18 {
19 public PrimitiveBaseShapeTableMapper(DatabaseMapper connection, string tableName) 19 public PrimitiveBaseShapeTableMapper(DatabaseMapper connection, string tableName)
20 : base(connection, tableName) 20 : base(connection, tableName)
@@ -140,4 +140,4 @@ namespace OpenSim.Framework.Data
140 return mapper; 140 return mapper;
141 } 141 }
142 } 142 }
143} \ No newline at end of file 143}