go-mysql MySQL 网络协议库

程序名称:go-mysql

授权协议: MIT

操作系统: 跨平台

开发语言: Google Go

go-mysql 介绍

go-mysql 是一个功能强大的 MySQL 协议处理工具集,你可以使用 client 连接操作 MySQL,使用 server 制作自己的 MySQL
proxy,使用 replication 同步 MySQL 的 binlog,使用 canal 进行 MySQL
到其他服务(Elasticsearch,Redis)的数据实时更新。

示例代码:

import (
    "github.com/siddontang/go-mysql/client"
)
// Connect MySQL at 127.0.0.1:3306, with user root, an empty passowrd and database test
conn, _ := client.Connect("127.0.0.1:3306", "root", "", "test")
conn.Ping()
// Insert
r, _ := conn.Execute(`insert into table (id, name) values (1, "abc")`)
// Get last insert id
println(r.InsertId)
// Select
r, _ := conn.Execute(`select id, name from table where id = 1`)
// Handle resultset
v, _ := r.GetInt(0, 0)
v, _ = r.GetIntByName(0, "id")

go-mysql 官网

http://git.oschina.net/siddontang/go-mysql

相关编程语言

SchemaCrawler提供一组用于增强标准JDBC Metadata的...
ER Master 是一个用于设计ER模型图的Eclipse插件。提...
Eclipse下用于画数据库ER图的插件,主要特性如下: ...
PowerDesigner 是Sybase的企业建模和设计解决方案,...
Mogwai ERDesigner NG是一个实体关系建模工具类似于...
Power*Architect 是一个数据建模工具,主要用在数据...