diff --git a/README.md b/README.md index e9ba1250..06082556 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,9 @@ Xorm is a simple and powerful ORM for Go. * Database Reverse support, See [Xorm Tool README](https://github.com/lunny/xorm/blob/master/xorm/README.md) * Simple cascade loading support + +* Optimistic Locking support + # Drivers Support @@ -37,6 +40,7 @@ Drivers for Go's sql package which currently support database/sql includes: # Changelog +* **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; diff --git a/README_CN.md b/README_CN.md index b1c0a54c..b90c8118 100644 --- a/README_CN.md +++ b/README_CN.md @@ -24,6 +24,8 @@ xorm是一个简单而强大的Go语言ORM库. 通过它可以使数据库操作 * 支持根据数据库自动生成xorm的结构体 +* 支持记录版本(即乐观锁) + ## 驱动支持 目前支持的Go数据库驱动如下: @@ -39,6 +41,7 @@ xorm是一个简单而强大的Go语言ORM库. 通过它可以使数据库操作 * Postgres: [github.com/bylevel/pq](https://github.com/bylevel/pq) ## 更新日志 +* **v0.2.3** : 改善了文档;提供了乐观锁支持;添加了带时区时间字段支持;Mapper现在分成表名Mapper和字段名Mapper,同时实现了表或字段的自定义前缀后缀;Insert方法的返回值含义从id, err更改为 affected, err,请大家注意;添加了UseBool 和 Distinct函数。 * **v0.2.2** : Postgres驱动新增了对lib/pq的支持;新增了逐条遍历方法Iterate;新增了SetMaxConns(go1.2+)支持,修复了bug若干; * **v0.2.1** : 新增数据库反转工具,当前支持go和c++代码的生成,详见 [Xorm Tool README](https://github.com/lunny/xorm/blob/master/xorm/README.md); 修复了一些bug. * **v0.2.0** : 新增 [缓存](https://github.com/lunny/xorm/blob/master/docs/QuickStart.md#120)支持,查询速度提升3-5倍; 新增数据库表和Struct同名的映射方式; 新增Sync同步表结构; diff --git a/VERSION b/VERSION index 10025411..828c1e21 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -xorm v0.2.2 +xorm v0.2.3 diff --git a/base_test.go b/base_test.go index 33790ae8..93c11d4c 100644 --- a/base_test.go +++ b/base_test.go @@ -1446,7 +1446,7 @@ type Version struct { } func testVersion(engine *Engine, t *testing.T) { - /*err := engine.DropTables(new(Version)) + err := engine.DropTables(new(Version)) if err != nil { t.Error(err) panic(err) @@ -1507,7 +1507,7 @@ func testVersion(engine *Engine, t *testing.T) { err = errors.New("insert error") t.Error(err) panic(err) - }*/ + } /* newVer.Name = "-------" diff --git a/docs/QuickStart.md b/docs/QuickStart.md index 8a58c8a4..aa2b491a 100644 --- a/docs/QuickStart.md +++ b/docs/QuickStart.md @@ -21,6 +21,7 @@ xorm 快速入门 * [5.5.Iterate方法](#65) * [5.6.Count方法](#66) * [6.更新数据](#70) +* [6.1.乐观锁](#71) * [7.删除数据](#80) * [8.执行SQL查询](#90) * [9.执行SQL命令](#100) @@ -176,6 +177,9 @@ type User struct {