Skip to content

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.

License

Notifications You must be signed in to change notification settings

PomeloFoundation/Pomelo.Data.MyCat

Repository files navigation

Pomelo.Data.MyCat

Travis build status AppVeyor build status NuGet Join the chat at https://gitter.im/PomeloFoundation/Home

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.

Getting Started

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();
                }
            }
        }
    }
}

Contribute

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.

License

MIT

About

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.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages