improved readme
This commit is contained in:
parent
7025815e94
commit
deacd6d4d6
10
README.md
10
README.md
|
@ -152,7 +152,7 @@ total, err := engine.Count(&User{Name:"xlw"})
|
|||
```
|
||||
|
||||
|
||||
##Execute SQL
|
||||
## Execute SQL
|
||||
|
||||
Of course, SQL execution is also provided.
|
||||
|
||||
|
@ -171,7 +171,7 @@ res, err := engine.Exec(sql, "xiaolun", 1)
|
|||
```
|
||||
|
||||
|
||||
##Advanced Usage
|
||||
## Advanced Usage
|
||||
|
||||
for deep usage, you should create a session, this func will create a database connection immediatelly
|
||||
|
||||
|
@ -271,7 +271,7 @@ if err != nil {
|
|||
}
|
||||
```
|
||||
|
||||
##Mapping Rules
|
||||
## Mapping Rules
|
||||
|
||||
<a name="mapping" id="mapping"></a>
|
||||
1.Struct and struct's fields name should be Pascal style, and the table and column's name default is SQL style.
|
||||
|
@ -321,12 +321,12 @@ type Userinfo struct {
|
|||
```
|
||||
|
||||
|
||||
##Documents
|
||||
## Documents
|
||||
|
||||
Please visit [GoWalker](http://gowalker.org/github.com/lunny/xorm)
|
||||
|
||||
|
||||
##FAQ
|
||||
## FAQ
|
||||
|
||||
1.How the xorm tag use both with json?
|
||||
|
||||
|
|
|
@ -148,7 +148,7 @@ err := engine.Delete(&User{Id:1})
|
|||
total, err := engine.Count(&User{Name:"xlw"})
|
||||
```
|
||||
|
||||
##直接执行SQL语句
|
||||
## 直接执行SQL语句
|
||||
|
||||
当然,如果你想直接使用SQL语句进行操作,也是允许的。
|
||||
|
||||
|
@ -166,7 +166,7 @@ sql = "update userinfo set username=? where id=?"
|
|||
res, err := engine.Exec(sql, "xiaolun", 1)
|
||||
```
|
||||
|
||||
##高级用法
|
||||
## 高级用法
|
||||
|
||||
<a name="mapping" id="mapping"></a>
|
||||
更高级的用法,我们必须要使用session对象,session对象在创建时会立刻创建一个数据库连接。
|
||||
|
@ -315,11 +315,11 @@ type Userinfo struct {
|
|||
}
|
||||
```
|
||||
|
||||
##文档
|
||||
## 文档
|
||||
|
||||
请访问 [GoWalker](http://gowalker.org/github.com/lunny/xorm) 查看详细文档
|
||||
|
||||
##FAQ
|
||||
## FAQ
|
||||
|
||||
1.问:xorm的tag和json的tag如何同时起作用?
|
||||
|
||||
|
|
Loading…
Reference in New Issue