Skip to content

Commit 8d91a7e

Browse files
committed
更新说明文档:增加pagehelper使用说明
1 parent 1075e5d commit 8d91a7e

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,3 +245,21 @@ import "github.com/xfali/gobatis/builder"
245245
String()
246246
t.Log(str)
247247
```
248+
249+
## 其他
250+
251+
### 1、分页
252+
使用[pagehelper](https://github.com/xfali/pagehelper): gobatis的配套分页工具
253+
```$xslt
254+
go get github.com/xfali/pagehelper
255+
```
256+
### 2、模糊查询支持
257+
使用LIKE CONCAT('%',#{field},'%')
258+
259+
举例:
260+
```$xslt
261+
SELECT <include refid="columns_id"> </include> FROM `TEST_TABLE`
262+
<where>
263+
<if test="{TestTable.username} != nil">AND `username` LIKE CONCAT('%',#{TestTable.username},'%') </if>
264+
</where>
265+
```

0 commit comments

Comments
 (0)