From e7d83f6fb5779ca7a88bf91fde2b0cf5a1ed629c Mon Sep 17 00:00:00 2001 From: Nash Tsai Date: Sun, 13 Apr 2014 11:17:27 +0800 Subject: [PATCH 01/11] fixed code error --- session.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/session.go b/session.go index a6c6e54f..078903a5 100644 --- a/session.go +++ b/session.go @@ -2911,7 +2911,7 @@ func (session *Session) Update(bean interface{}, condiBean ...interface{}) (int6 var sqlStr, inSql string var inArgs []interface{} doIncVer := false - var verValue *reflect.Value + var verValue reflect.Value if table.Version != "" && session.Statement.checkVersion { if condition != "" { condition = fmt.Sprintf("WHERE (%v) AND %v = ?", condition, @@ -2934,10 +2934,10 @@ func (session *Session) Update(bean interface{}, condiBean ...interface{}) (int6 session.Engine.Quote(table.Version)+" = "+session.Engine.Quote(table.Version)+" + 1", condition) - verValue, err = table.VersionColumn().ValueOf(bean) - if err != nil { - return 0, err - } + verValue = table.VersionColumn().ValueOf(bean) + //if err != nil { + // return 0, err + //} condiArgs = append(condiArgs, verValue.Interface()) doIncVer = true From a7ffe8bdc88743549d94428f8afbed87b8e229a4 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Sun, 13 Apr 2014 14:32:21 +0800 Subject: [PATCH 02/11] add use case gobbs --- README.md | 3 +++ README_CN.md | 3 +++ 2 files changed, 6 insertions(+) diff --git a/README.md b/README.md index 4f85368b..b2a98723 100644 --- a/README.md +++ b/README.md @@ -90,6 +90,9 @@ Or * [GoCMS - github.com/zzboy/GoCMS](https://github.com/zzdboy/GoCMS) +* [GoBBS - gobbs.domolo.com](http://gobbs.domolo.com/) + + # Discuss Please visit [Xorm on Google Groups](https://groups.google.com/forum/#!forum/xorm) diff --git a/README_CN.md b/README_CN.md index 35b7ed70..5d4d3457 100644 --- a/README_CN.md +++ b/README_CN.md @@ -93,6 +93,9 @@ xorm是一个简单而强大的Go语言ORM库. 通过它可以使数据库操作 * [GoCMS - github.com/zzboy/GoCMS](https://github.com/zzdboy/GoCMS) +* [GoBBS - gobbs.domolo.com](http://gobbs.domolo.com/) + + ## 讨论 请加入QQ群:280360085 进行讨论。 From dfcb1a9541740dd89e5533e83ef0cf2f82544da3 Mon Sep 17 00:00:00 2001 From: Nash Tsai Date: Mon, 14 Apr 2014 15:39:33 +0800 Subject: [PATCH 03/11] update changelog --- docs/Changelog.md | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/docs/Changelog.md b/docs/Changelog.md index aeeccbbe..0bc30cb2 100644 --- a/docs/Changelog.md +++ b/docs/Changelog.md @@ -1,5 +1,15 @@ ## Changelog +* **v0.3.2** + Improvements: + * Add MustCols function + + Bug Fixes: + * #53 + * #89 + * #86 + * #92 + * **v0.3.1** Features: @@ -11,20 +21,20 @@ Improvements: * Allowed int/int32/int64/uint/uint32/uint64/string as Primary Key type - * Performance improvement for Get()/Find()/Iterate() + * Performance improvement for Get()/Find()/Iterate() * **v0.2.3** : Improved documents; Optimistic Locking support; Timestamp with time zone support; Mapper change to tableMapper and columnMapper & added PrefixMapper & SuffixMapper support custom table or column name's prefix and suffix;Insert now return affected, err instead of id, err; Added UseBool & Distinct; * **v0.2.2** : Postgres drivers now support lib/pq; Added method Iterate for record by record to handler;Added SetMaxConns(go1.2+) support; some bugs fixed. -* **v0.2.1** : Added database reverse tool, now support generate go & c++ codes, see [Xorm Tool README](https://github.com/lunny/xorm/blob/master/xorm/README.md); some bug fixed. -* **v0.2.0** : Added Cache supported, select is speeder up 3~5x; Added SameMapper for same name between struct and table; Added Sync method for auto added tables, columns, indexes; -* **v0.1.9** : Added postgres and mymysql supported; Added ` and ? supported on Raw SQL even if postgres; Added Cols, StoreEngine, Charset function, Added many column data type supported, please see [Mapping Rules](#mapping). -* **v0.1.8** : Added union index and union unique supported, please see [Mapping Rules](#mapping). -* **v0.1.7** : Added IConnectPool interface and NoneConnectPool, SysConnectPool, SimpleConnectPool the three implements. You can choose one of them and the default is SysConnectPool. You can customrize your own connection pool. struct Engine added Close method, It should be invoked before system exit. -* **v0.1.6** : Added conversion interface support; added struct derive support; added single mapping support -* **v0.1.5** : Added multi threads support; added Sql() function for struct query; Get function changed return inteface; MakeSession and Create are instead with NewSession and NewEngine. -* **v0.1.4** : Added simple cascade load support; added more data type supports. -* **v0.1.3** : Find function now supports both slice and map; Add Table function for multi tables and temperory tables support -* **v0.1.2** : Insert function now supports both struct and slice pointer parameters, batch inserting and auto transaction -* **v0.1.1** : Add Id, In functions and improved README +* **v0.2.1** : Added database reverse tool, now support generate go & c++ codes, see [Xorm Tool README](https://github.com/lunny/xorm/blob/master/xorm/README.md); some bug fixed. +* **v0.2.0** : Added Cache supported, select is speeder up 3~5x; Added SameMapper for same name between struct and table; Added Sync method for auto added tables, columns, indexes; +* **v0.1.9** : Added postgres and mymysql supported; Added ` and ? supported on Raw SQL even if postgres; Added Cols, StoreEngine, Charset function, Added many column data type supported, please see [Mapping Rules](#mapping). +* **v0.1.8** : Added union index and union unique supported, please see [Mapping Rules](#mapping). +* **v0.1.7** : Added IConnectPool interface and NoneConnectPool, SysConnectPool, SimpleConnectPool the three implements. You can choose one of them and the default is SysConnectPool. You can customrize your own connection pool. struct Engine added Close method, It should be invoked before system exit. +* **v0.1.6** : Added conversion interface support; added struct derive support; added single mapping support +* **v0.1.5** : Added multi threads support; added Sql() function for struct query; Get function changed return inteface; MakeSession and Create are instead with NewSession and NewEngine. +* **v0.1.4** : Added simple cascade load support; added more data type supports. +* **v0.1.3** : Find function now supports both slice and map; Add Table function for multi tables and temperory tables support +* **v0.1.2** : Insert function now supports both struct and slice pointer parameters, batch inserting and auto transaction +* **v0.1.1** : Add Id, In functions and improved README * **v0.1.0** : Inital release. \ No newline at end of file From 5ace07aaefad450381e4b668d3e8d2be85a02b21 Mon Sep 17 00:00:00 2001 From: Nash Tsai Date: Mon, 14 Apr 2014 15:44:32 +0800 Subject: [PATCH 04/11] Update Changelog.md --- docs/Changelog.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/Changelog.md b/docs/Changelog.md index 0bc30cb2..ccb097c1 100644 --- a/docs/Changelog.md +++ b/docs/Changelog.md @@ -5,7 +5,7 @@ * Add MustCols function Bug Fixes: - * #53 + * [issues/85](#53) * #89 * #86 * #92 @@ -37,4 +37,4 @@ * **v0.1.3** : Find function now supports both slice and map; Add Table function for multi tables and temperory tables support * **v0.1.2** : Insert function now supports both struct and slice pointer parameters, batch inserting and auto transaction * **v0.1.1** : Add Id, In functions and improved README -* **v0.1.0** : Inital release. \ No newline at end of file +* **v0.1.0** : Inital release. From 564498d05911c49e4b123cb96cbf22ebd282d03d Mon Sep 17 00:00:00 2001 From: Nash Tsai Date: Mon, 14 Apr 2014 15:45:27 +0800 Subject: [PATCH 05/11] Update Changelog.md --- docs/Changelog.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Changelog.md b/docs/Changelog.md index ccb097c1..052f75dc 100644 --- a/docs/Changelog.md +++ b/docs/Changelog.md @@ -5,7 +5,7 @@ * Add MustCols function Bug Fixes: - * [issues/85](#53) + * [#53](../issues/85) * #89 * #86 * #92 From 0a0fe097f17d13330bf4a48a636b94d2fda31fd8 Mon Sep 17 00:00:00 2001 From: Nash Tsai Date: Mon, 14 Apr 2014 15:46:03 +0800 Subject: [PATCH 06/11] Update Changelog.md --- docs/Changelog.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Changelog.md b/docs/Changelog.md index 052f75dc..18e9d434 100644 --- a/docs/Changelog.md +++ b/docs/Changelog.md @@ -5,7 +5,7 @@ * Add MustCols function Bug Fixes: - * [#53](../issues/85) + * [#53](/go-xorm/xorm/issues/53) * #89 * #86 * #92 From 4354584b85870f8a48c5b646f922e4feb45ce591 Mon Sep 17 00:00:00 2001 From: Nash Tsai Date: Mon, 14 Apr 2014 15:46:35 +0800 Subject: [PATCH 07/11] Update Changelog.md --- docs/Changelog.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Changelog.md b/docs/Changelog.md index 18e9d434..756a0128 100644 --- a/docs/Changelog.md +++ b/docs/Changelog.md @@ -5,7 +5,7 @@ * Add MustCols function Bug Fixes: - * [#53](/go-xorm/xorm/issues/53) + * [#53] * #89 * #86 * #92 From 215448281c7be23d97198ba32afe2952329a0de2 Mon Sep 17 00:00:00 2001 From: Nash Tsai Date: Mon, 14 Apr 2014 15:46:48 +0800 Subject: [PATCH 08/11] Update Changelog.md --- docs/Changelog.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Changelog.md b/docs/Changelog.md index 756a0128..5eacb319 100644 --- a/docs/Changelog.md +++ b/docs/Changelog.md @@ -5,7 +5,7 @@ * Add MustCols function Bug Fixes: - * [#53] + * #53 * #89 * #86 * #92 From 091aec9c2bd9a0fedc778b152f59ef4eb31300c6 Mon Sep 17 00:00:00 2001 From: Nash Tsai Date: Mon, 14 Apr 2014 22:13:35 +0800 Subject: [PATCH 09/11] update changelog --- docs/Changelog.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/Changelog.md b/docs/Changelog.md index 5eacb319..273f68cd 100644 --- a/docs/Changelog.md +++ b/docs/Changelog.md @@ -5,6 +5,8 @@ * Add MustCols function Bug Fixes: + * #46 + * #51 * #53 * #89 * #86 From bb61623ba42375e45e96bcf31ebdad7a8011f957 Mon Sep 17 00:00:00 2001 From: Nash Tsai Date: Mon, 14 Apr 2014 22:15:01 +0800 Subject: [PATCH 10/11] pump xorm version 0.3.2 --- README.md | 12 ++++++++++++ VERSION | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b2a98723..ed22a941 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,18 @@ Drivers for Go's sql package which currently support database/sql includes: # Changelog +* **v0.3.2** + Improvements: + * Add MustCols function + + Bug Fixes: + * #46 + * #51 + * #53 + * #89 + * #86 + * #92 + * **v0.3.1** Features: diff --git a/VERSION b/VERSION index a67c0014..df1861e4 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -xorm v0.3.1 +xorm v0.3.2 From 99447660a6c30cfc8f73a3590e51b8a7343c4b8e Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Tue, 15 Apr 2014 09:52:48 +0800 Subject: [PATCH 11/11] improved changelog --- docs/Changelog.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/Changelog.md b/docs/Changelog.md index 273f68cd..7f023d51 100644 --- a/docs/Changelog.md +++ b/docs/Changelog.md @@ -2,7 +2,8 @@ * **v0.3.2** Improvements: - * Add MustCols function + * Add AllCols & MustCols function + * Add TableName for custom table name Bug Fixes: * #46