Contains MyCat (An open source MySQL cluster proxy which based on Cobar) implementations of the System.Data.Common(Both .NET Core and .NET Framework) interfaces.
To add the Pomelo.Data.MyCat
into your project.json
:
{
"version": "1.0.0-*",
"buildOptions": {
"emitEntryPoint": true
},
"dependencies": {
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.0.0"
},
"Pomelo.Data.MyCat": "1.0.0"
},
"frameworks": {
"netcoreapp1.0": {
"imports": "dnxcore50"
}
}
}
MyCatConnection
, MyCatCommand
and etc were included in the namespace Pomelo.Data.MyCat
. The following console application sample will show you how to use this library to write a record into MyCat database.
using Pomelo.Data.MyCat;
namespace MyCatAdoSample
{
public class Program
{
public static void Main(string[] args)
{
using (var conn = new MyCatConnection("server=localhost;database=adosample;uid=root;pwd=yourpwd"))
{
conn.Open();
using (var cmd = new MyCatCommand("INSERT INTO `test` (`content`) VALUES ('Hello MyCat')", conn))
{
cmd.ExecuteNonQuery();
}
}
}
}
}
One of the easiest ways to contribute is to participate in discussions and discuss issues. You can also contribute by submitting pull requests with code changes.