mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 17:55:48 +08:00
* Some morw work on specializing the database framework for OpenSim
This commit is contained in:
@@ -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>(TObj obj, System.Data.Common.DbCommand command, List<string> fieldNames)
|
||||
public override void ExpandField<TObj>(TObj obj, DbCommand command, List<string> fieldNames)
|
||||
{
|
||||
string fieldName = FieldName;
|
||||
object value = GetParamValue(obj);
|
||||
|
||||
17
OpenSim/Framework/Data/OpenSimTableMapper.cs
Normal file
17
OpenSim/Framework/Data/OpenSimTableMapper.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System.Data;
|
||||
using TribalMedia.Framework.Data;
|
||||
|
||||
namespace OpenSim.Framework.Data
|
||||
{
|
||||
public abstract class OpenSimTableMapper<TRowMapper, TPrimaryKey> : ObjectTableMapper<TRowMapper, TPrimaryKey>
|
||||
{
|
||||
public OpenSimTableMapper(DatabaseMapper database, string tableName) : base(database, tableName)
|
||||
{
|
||||
}
|
||||
|
||||
protected override DataReader CreateReader(IDataReader reader)
|
||||
{
|
||||
return new OpenSimDataReader(reader);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -14,7 +14,7 @@ namespace OpenSim.Framework.Data
|
||||
}
|
||||
}
|
||||
|
||||
public class PrimitiveBaseShapeTableMapper : ObjectTableMapper<PrimitiveBaseShapeRowMapper, Guid>
|
||||
public class PrimitiveBaseShapeTableMapper : OpenSimTableMapper<PrimitiveBaseShapeRowMapper, Guid>
|
||||
{
|
||||
public PrimitiveBaseShapeTableMapper(DatabaseMapper connection, string tableName)
|
||||
: base(connection, tableName)
|
||||
@@ -140,4 +140,4 @@ namespace OpenSim.Framework.Data
|
||||
return mapper;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user