diff options
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r-- | OpenSim/Framework/Data/OpenSimObjectFieldMapper.cs | 3 | ||||
-rw-r--r-- | OpenSim/Framework/Data/OpenSimTableMapper.cs | 17 | ||||
-rw-r--r-- | OpenSim/Framework/Data/PrimitiveBaseShapeTableMapper.cs | 4 |
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 @@ | |||
1 | using System; | 1 | using System; |
2 | using System.Collections.Generic; | 2 | using System.Collections.Generic; |
3 | using System.Data.Common; | ||
3 | using System.Text; | 4 | using System.Text; |
4 | using libsecondlife; | 5 | using libsecondlife; |
5 | using TribalMedia.Framework.Data; | 6 | using 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 @@ | |||
1 | using System.Data; | ||
2 | using TribalMedia.Framework.Data; | ||
3 | |||
4 | namespace 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 | } |