improved readme
This commit is contained in:
parent
db3ab86e8c
commit
aa93d08a8f
|
@ -167,7 +167,7 @@ sql = "update userinfo set username=? where id=?"
|
||||||
res, err := engine.Exec(sql, "xiaolun", 1)
|
res, err := engine.Exec(sql, "xiaolun", 1)
|
||||||
```
|
```
|
||||||
|
|
||||||
##Deep Use
|
##Advanced Usage
|
||||||
for deep usage, you should create a session, this func will create a database connection immediatelly
|
for deep usage, you should create a session, this func will create a database connection immediatelly
|
||||||
|
|
||||||
```
|
```
|
||||||
|
@ -266,7 +266,8 @@ if err != nil {
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
##Mapping Rules
|
##Mapping Rules
|
||||||
|
<a name="8" id="8"></a>
|
||||||
1.Struct and struct's fields name should be Pascal style, and the table and column's name default is SQL style.
|
1.Struct and struct's fields name should be Pascal style, and the table and column's name default is SQL style.
|
||||||
|
|
||||||
For example:
|
For example:
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
# xorm
|
# xorm
|
||||||
----------
|
|
||||||
[English](https://github.com/lunny/xorm/blob/master/README.md)
|
[English](https://github.com/lunny/xorm/blob/master/README.md)
|
||||||
|
|
||||||
xorm是一个Go语言的ORM库. 通过它可以使数据库操作非常简便。
|
xorm是一个Go语言的ORM库. 通过它可以使数据库操作非常简便。
|
||||||
|
@ -163,6 +162,7 @@ res, err := engine.Exec(sql, "xiaolun", 1)
|
||||||
```
|
```
|
||||||
|
|
||||||
##高级用法
|
##高级用法
|
||||||
|
<a name="8" id="8"></a>
|
||||||
更高级的用法,我们必须要使用session对象,session对象在创建时会立刻创建一个数据库连接。
|
更高级的用法,我们必须要使用session对象,session对象在创建时会立刻创建一个数据库连接。
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in New Issue