From a50ce8d984a8938f7bd6ee3ad61ac688a709b8cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=95=86=E8=AE=AF=E5=9C=A8=E7=BA=BF?= Date: Wed, 19 Feb 2014 22:01:02 +0800 Subject: [PATCH] update MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 商讯在线 --- CONTRIBUTING.md | 7 +++++-- README.md | 2 ++ README_CN.md | 2 ++ mysql.go | 3 ++- session.go | 2 +- 5 files changed, 12 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c7fde071..6f65c2ae 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,14 +1,17 @@ ## Contributing to xorm -`xorm` has a backlog of pull requests, but contributions are still very +`xorm` has a backlog of [pull requests](https://help.github.com/articles/using-pull-requests), but contributions are still very much welcome. You can help with patch review, submitting bug reports, or adding new functionality. There is no formal style guide, but please conform to the style of existing code and general Go formatting conventions when submitting patches. +* [fork a repo](https://help.github.com/articles/fork-a-repo) +* [creating a pull request ](https://help.github.com/articles/creating-a-pull-request) + ### Patch review -Help review existing open pull requests by commenting on the code or +Help review existing open [pull requests](https://help.github.com/articles/using-pull-requests) by commenting on the code or proposed functionality. ### Bug reports diff --git a/README.md b/README.md index 85e5d46c..c5fb4ca7 100644 --- a/README.md +++ b/README.md @@ -78,6 +78,8 @@ Or * [Gowalker](http://gowalker.org) - [github.com/Unknwon/gowalker](http://github.com/Unknwon/gowalker) +* [Gobuild.io](http://gobuild.io) - [github.com/shxsun/gobuild](http://github.com/shxsun/gobuild) + * [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) diff --git a/README_CN.md b/README_CN.md index 8088f423..d7e8de80 100644 --- a/README_CN.md +++ b/README_CN.md @@ -81,6 +81,8 @@ xorm是一个简单而强大的Go语言ORM库. 通过它可以使数据库操作 * [Gowalker](http://gowalker.org) - [github.com/Unknwon/gowalker](http://github.com/Unknwon/gowalker) +* [Gobuild.io](http://gobuild.io) - [github.com/shxsun/gobuild](http://github.com/shxsun/gobuild) + * [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) diff --git a/mysql.go b/mysql.go index aff13333..23b53641 100644 --- a/mysql.go +++ b/mysql.go @@ -111,6 +111,7 @@ func (db *mysql) SqlType(c *Column) string { switch t := c.SQLType.Name; t { case Bool: res = TinyInt + c.Length = 1 case Serial: c.IsAutoIncrement = true c.IsPrimaryKey = true @@ -259,7 +260,7 @@ func (db *mysql) GetColumns(tableName string) ([]string, map[string]*Column, err if col.SQLType.IsText() { if col.Default != "" { col.Default = "'" + col.Default + "'" - }else{ + } else { if col.DefaultIsEmpty { col.Default = "''" } diff --git a/session.go b/session.go index 75570fcd..825acc46 100644 --- a/session.go +++ b/session.go @@ -2627,7 +2627,7 @@ func (session *Session) innerInsert(bean interface{}) (int64, error) { // Method InsertOne insert only one struct into database as a record. // The in parameter bean must a struct or a point to struct. The return -// parameter is lastInsertId and error +// parameter is inserted and error func (session *Session) InsertOne(bean interface{}) (int64, error) { err := session.newDb() if err != nil {