update QuickStart

This commit is contained in:
Nash Tsai 2014-04-18 16:46:58 +08:00
parent 783e905649
commit aa150a7ba2
2 changed files with 7 additions and 2 deletions

View File

@ -96,8 +96,8 @@ engine.Logger = f
3.Engine provide DB connection pool settings. 3.Engine provide DB connection pool settings.
* Use `engine.SetIdleConns()` to set idle connections. * Use `engine.SetMaxIdleConns()` to set idle connections.
* Use `engine.SetMaxConns()` to set Max connections. This methods support only Go 1.2+. * Use `engine.SetMaxOpenConns()` to set Max connections. This methods support only Go 1.2+.
<a name="20" id="20"></a> <a name="20" id="20"></a>
## 2.Define struct ## 2.Define struct

View File

@ -98,6 +98,11 @@ f, err := os.Create("sql.log")
engine.Logger = f engine.Logger = f
``` ```
3.engine内部支持连接池接口。
* 如果需要设置连接池的空闲数大小,可以使用`engine.SetMaxIdleConns()`来实现。
* 如果需要设置最大打开连接数,则可以使用`engine.SetMaxOpenConns()`来实现。
<a name="20" id="20"></a> <a name="20" id="20"></a>
## 2.定义表结构体 ## 2.定义表结构体