Files
build-web-application-with-…/5.5.md
2012-09-11 23:20:37 +08:00

41 lines
1.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#5.5使用beedb库进行ORM开发
beedb是我开发的一个Go进行ORM操作的库它采用了Go style方式来进行数据库的操作实现了struct映射到关系型数据表记录。beedb是一个十分轻量级的Go ORM框架开发这个库的本意旨在降低复杂的ORM学习曲线尽可能在ORM的运行效率和功能之间做一个平衡点beedb是目前开源的Go ORM框架中实现比较完整的一个库而且运行效率相当不错功能也基本能满足需求。但是目前还不支持关系关联这个也会是接下来开发的重点。
beedb是支持database/sql标准接口的ORM库所以理论上来说只要数据库驱动支持database/sql接口就可以无缝的接入beedb。目前我测试过的驱动包括下面几个
Mysql:github.com/ziutek/mymysql/godrv[*]
Mysql:code.google.com/p/go-mysql-driver[*]
PostgreSQL:github.com/bmizerany/pq[*]
SQLite:github.com/mattn/go-sqlite3[*]
MS ADODB: github.com/mattn/go-adodb[*]
ODBC: bitbucket.org/miquella/mgodbc[*]
##安装
##如何初始化
##插入数据
##查询数据
##更新数据
##删除数据
##关联查询
##Group By和Having
## links
* [目录](<preface.md>)
* 上一节: [使用PostgreSQL数据库](<5.4.md>)
* 下一节: [NOSQL数据库操作](<5.6.md>)
## LastModified
* $Id$