From 6d751411b7f996c486052c8cbbdbe1e186cebd9f Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Mon, 14 Jan 2008 22:34:19 +0000 Subject: * Added specialization of DatabaseMapper, DataReader and ObjectFieldMapper to support LLVector3, LLQuaternion and LLUUID * Added PrimitiveBaseShapeTableMapper to show how it's done NOTE: Nothing actually works yet - this code should be considered more of educational value until it's all wired together --- .../Framework/Data.MySQL/MySQLDatabaseMapper.cs | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 OpenSim/Framework/Data.MySQL/MySQLDatabaseMapper.cs (limited to 'OpenSim/Framework/Data.MySQL/MySQLDatabaseMapper.cs') diff --git a/OpenSim/Framework/Data.MySQL/MySQLDatabaseMapper.cs b/OpenSim/Framework/Data.MySQL/MySQLDatabaseMapper.cs new file mode 100644 index 0000000..1514f00 --- /dev/null +++ b/OpenSim/Framework/Data.MySQL/MySQLDatabaseMapper.cs @@ -0,0 +1,24 @@ +using System.Data.Common; +using MySql.Data.MySqlClient; + +namespace OpenSim.Framework.Data.MySQL +{ + public class MySQLDatabaseMapper : OpenSimDatabaseMapper + { + public MySQLDatabaseMapper(string connectionString) + : base(connectionString) + { + } + + public override DbConnection GetNewConnection() + { + MySqlConnection connection = new MySqlConnection(m_connectionString); + return connection; + } + + public override string CreateParamName(string fieldName) + { + return "?" + fieldName; + } + } +} -- cgit v1.1