From 47c65295236560b0c58c1797ce2ad19418fa2b94 Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Tue, 15 Jan 2008 10:15:39 +0000 Subject: * Some morw work on specializing the database framework for OpenSim --- OpenSim/Framework/Data/OpenSimObjectFieldMapper.cs | 3 ++- OpenSim/Framework/Data/OpenSimTableMapper.cs | 17 +++++++++++++++++ OpenSim/Framework/Data/PrimitiveBaseShapeTableMapper.cs | 4 ++-- 3 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 OpenSim/Framework/Data/OpenSimTableMapper.cs (limited to 'OpenSim') 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 @@ using System; using System.Collections.Generic; +using System.Data.Common; using System.Text; using libsecondlife; using TribalMedia.Framework.Data; @@ -15,7 +16,7 @@ namespace OpenSim.Framework.Data { } - public override void ExpandField(TObj obj, System.Data.Common.DbCommand command, List fieldNames) + public override void ExpandField(TObj obj, DbCommand command, List fieldNames) { string fieldName = FieldName; 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 @@ +using System.Data; +using TribalMedia.Framework.Data; + +namespace OpenSim.Framework.Data +{ + public abstract class OpenSimTableMapper : ObjectTableMapper + { + public OpenSimTableMapper(DatabaseMapper database, string tableName) : base(database, tableName) + { + } + + protected override DataReader CreateReader(IDataReader reader) + { + return new OpenSimDataReader(reader); + } + } +} 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 } } - public class PrimitiveBaseShapeTableMapper : ObjectTableMapper + public class PrimitiveBaseShapeTableMapper : OpenSimTableMapper { public PrimitiveBaseShapeTableMapper(DatabaseMapper connection, string tableName) : base(connection, tableName) @@ -140,4 +140,4 @@ namespace OpenSim.Framework.Data return mapper; } } -} \ No newline at end of file +} -- cgit v1.1