aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Data/OpenSimDatabaseConnector.cs
blob: ec804885683688957c8e30cc709144c7ed1d2de1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
using System.Data;
using libsecondlife;
using TribalMedia.Framework.Data;

namespace OpenSim.Framework.Data
{
    public abstract class OpenSimDatabaseConnector : BaseDatabaseConnector
    {
        public OpenSimDatabaseConnector(string connectionString) : base(connectionString)
        {
        }

        public override object ConvertToDbType(object value)
        {
            if (value is LLUUID)
            {
                return ((LLUUID) value).UUID.ToString();
            }

            return base.ConvertToDbType(value);
        }

        public override BaseDataReader CreateReader(IDataReader reader)
        {
            return new OpenSimDataReader(reader);
        }
    }
}