2014-01-07 09:21:02 +00:00
|
|
|
[中文](https://github.com/lunny/xorm/blob/master/README_CN.md)
|
|
|
|
|
|
|
|
Xorm is a simple and powerful ORM for Go.
|
|
|
|
|
2014-04-15 13:52:19 +00:00
|
|
|
[](https://drone.io/github.com/go-xorm/xorm/latest) [](http://gowalker.org/github.com/go-xorm/xorm) [](https://bitdeli.com/free "Bitdeli Badge")
|
2013-11-22 01:20:41 +00:00
|
|
|
|
2014-01-07 09:21:02 +00:00
|
|
|
# Features
|
|
|
|
|
2013-11-22 01:20:41 +00:00
|
|
|
* Struct <-> Table Mapping Support
|
2013-09-29 14:39:59 +00:00
|
|
|
|
2013-11-22 01:20:41 +00:00
|
|
|
* Chainable APIs
|
|
|
|
|
|
|
|
* Transaction Support
|
2014-01-07 09:21:02 +00:00
|
|
|
|
2013-11-22 05:05:10 +00:00
|
|
|
* Both ORM and raw SQL operation Support
|
2013-11-22 01:20:41 +00:00
|
|
|
|
2014-04-15 12:09:20 +00:00
|
|
|
* Sync database schema Support
|
2013-11-22 01:20:41 +00:00
|
|
|
|
2013-11-22 05:05:10 +00:00
|
|
|
* Query Cache speed up
|
2013-11-22 01:20:41 +00:00
|
|
|
|
2014-04-15 13:52:19 +00:00
|
|
|
* Database Reverse support, See [Xorm Tool README](https://github.com/go-xorm/xorm/blob/master/xorm/README.md)
|
2013-11-22 01:20:41 +00:00
|
|
|
|
|
|
|
* Simple cascade loading support
|
2013-11-29 03:50:28 +00:00
|
|
|
|
|
|
|
* Optimistic Locking support
|
|
|
|
|
2014-01-07 09:21:02 +00:00
|
|
|
|
|
|
|
# Drivers Support
|
|
|
|
|
|
|
|
Drivers for Go's sql package which currently support database/sql includes:
|
|
|
|
|
2013-11-22 05:05:10 +00:00
|
|
|
* Mysql: [github.com/go-sql-driver/mysql](https://github.com/go-sql-driver/mysql)
|
2014-01-07 09:21:02 +00:00
|
|
|
|
|
|
|
* MyMysql: [github.com/ziutek/mymysql/godrv](https://github.com/ziutek/mymysql/godrv)
|
|
|
|
|
|
|
|
* SQLite: [github.com/mattn/go-sqlite3](https://github.com/mattn/go-sqlite3)
|
|
|
|
|
|
|
|
* Postgres: [github.com/lib/pq](https://github.com/lib/pq)
|
|
|
|
|
|
|
|
* MsSql: [github.com/lunny/godbc](https://github.com/lunny/godbc)
|
|
|
|
|
2013-11-22 01:20:41 +00:00
|
|
|
# Changelog
|
2013-10-15 02:40:21 +00:00
|
|
|
|
2014-04-14 14:15:01 +00:00
|
|
|
* **v0.3.2**
|
|
|
|
Improvements:
|
|
|
|
* Add MustCols function
|
|
|
|
|
|
|
|
Bug Fixes:
|
|
|
|
* #46
|
|
|
|
* #51
|
|
|
|
* #53
|
|
|
|
* #89
|
|
|
|
* #86
|
|
|
|
* #92
|
|
|
|
|
2014-01-07 09:21:02 +00:00
|
|
|
* **v0.3.1**
|
|
|
|
|
|
|
|
Features:
|
2014-01-02 09:48:57 +00:00
|
|
|
* Support MSSQL DB via ODBC driver ([github.com/lunny/godbc](https://github.com/lunny/godbc));
|
|
|
|
* Composite Key, using multiple pk xorm tag
|
|
|
|
* Added Row() API as alternative to Iterate() API for traversing result set, provide similar usages to sql.Rows type
|
|
|
|
* ORM struct allowed declaration of pointer builtin type as members to allow null DB fields
|
|
|
|
* Before and After Event processors
|
|
|
|
|
|
|
|
Improvements:
|
|
|
|
* Allowed int/int32/int64/uint/uint32/uint64/string as Primary Key type
|
|
|
|
* Performance improvement for Get()/Find()/Iterate()
|
2013-11-06 07:36:38 +00:00
|
|
|
|
2014-04-15 13:52:19 +00:00
|
|
|
[More changelogs ...](https://github.com/go-xorm/xorm/blob/master/docs/Changelog.md)
|
2014-01-07 09:21:02 +00:00
|
|
|
|
2013-12-01 03:08:17 +00:00
|
|
|
# Installation
|
|
|
|
|
|
|
|
If you have [gopm](https://github.com/gpmgo/gopm) installed,
|
|
|
|
|
2014-04-15 13:52:19 +00:00
|
|
|
gopm get github.com/go-xorm/xorm
|
2013-12-01 03:08:17 +00:00
|
|
|
|
2014-01-07 09:21:02 +00:00
|
|
|
Or
|
|
|
|
|
2014-04-15 13:52:19 +00:00
|
|
|
go get github.com/go-xorm/xorm
|
2014-01-07 09:21:02 +00:00
|
|
|
|
2013-11-22 05:05:10 +00:00
|
|
|
# Documents
|
2013-10-15 02:40:21 +00:00
|
|
|
|
2014-04-15 13:52:19 +00:00
|
|
|
* [GoDoc](http://godoc.org/github.com/go-xorm/xorm)
|
2014-01-07 09:21:02 +00:00
|
|
|
|
2014-04-15 13:52:19 +00:00
|
|
|
* [GoWalker](http://gowalker.org/github.com/go-xorm/xorm)
|
2013-10-15 02:40:21 +00:00
|
|
|
|
2014-04-15 13:52:19 +00:00
|
|
|
* [Quick Start](https://github.com/go-xorm/xorm/blob/master/docs/QuickStartEn.md)
|
2013-11-22 05:05:10 +00:00
|
|
|
|
2013-11-22 01:20:41 +00:00
|
|
|
# Cases
|
2013-10-15 02:40:21 +00:00
|
|
|
|
2014-03-27 14:16:06 +00:00
|
|
|
* [Gogs](http://try.gogits.org) - [github.com/gogits/gogs](http://github.com/gogits/gogs)
|
|
|
|
|
2013-11-15 03:04:48 +00:00
|
|
|
* [Gowalker](http://gowalker.org) - [github.com/Unknwon/gowalker](http://github.com/Unknwon/gowalker)
|
|
|
|
|
2014-02-12 07:10:37 +00:00
|
|
|
* [Gobuild.io](http://gobuild.io) - [github.com/shxsun/gobuild](http://github.com/shxsun/gobuild)
|
|
|
|
|
2013-10-15 02:40:21 +00:00
|
|
|
* [Sudo China](http://sudochina.com) - [github.com/insionng/toropress](http://github.com/insionng/toropress)
|
|
|
|
|
|
|
|
* [Godaily](http://godaily.org) - [github.com/govc/godaily](http://github.com/govc/godaily)
|
|
|
|
|
2014-01-07 09:21:02 +00:00
|
|
|
* [Very Hour](http://veryhour.com/)
|
|
|
|
|
2014-03-27 14:16:06 +00:00
|
|
|
* [GoCMS - github.com/zzboy/GoCMS](https://github.com/zzdboy/GoCMS)
|
2014-01-07 09:21:02 +00:00
|
|
|
|
2014-04-13 06:32:21 +00:00
|
|
|
* [GoBBS - gobbs.domolo.com](http://gobbs.domolo.com/)
|
|
|
|
|
|
|
|
|
2013-11-22 01:20:41 +00:00
|
|
|
# Discuss
|
|
|
|
|
2013-12-08 13:40:58 +00:00
|
|
|
Please visit [Xorm on Google Groups](https://groups.google.com/forum/#!forum/xorm)
|
|
|
|
|
|
|
|
# Contributors
|
|
|
|
|
2014-04-15 13:52:19 +00:00
|
|
|
If you want to pull request, please see [CONTRIBUTING](https://github.com/go-xorm/xorm/blob/master/CONTRIBUTING.md)
|
2013-12-31 06:33:02 +00:00
|
|
|
|
2013-12-08 13:40:58 +00:00
|
|
|
* [Lunny](https://github.com/lunny)
|
2014-01-07 09:21:02 +00:00
|
|
|
* [Nashtsai](https://github.com/nashtsai)
|
|
|
|
|
|
|
|
# LICENSE
|
|
|
|
|
|
|
|
BSD License
|
2014-04-15 12:09:20 +00:00
|
|
|
[http://creativecommons.org/licenses/BSD/](http://creativecommons.org/licenses/BSD/)
|