Skip to content

Commit dd929e9

Browse files
committed
Merge branch 'release/v0.1.1'
2 parents 5f02b4d + c8f3de7 commit dd929e9

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
### v0.1.1
6+
7+
> 23 October 2022
8+
9+
- Fixed incompatible `ILIKE` query when using SQLite3 as DB ([#5](https://github.com/slaveofcode/hansip/issues/5))
10+
511
### v0.1.0
612

713
> 22 October 2022

routes/auth/register.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ func Register(repo repository.Repository) func(c *gin.Context) {
5656
}
5757

5858
var findExtAlias models.User
59-
res = tx.Where(`"alias" ILIKE ?`, bodyParams.Alias).First(&findExtAlias)
59+
res = tx.Where(`"alias" LIKE ?`, bodyParams.Alias).First(&findExtAlias)
6060

6161
if res.RowsAffected > 0 {
6262
return errors.New("alias already exist")

routes/user/query.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ func UserQueries(repo repository.Repository) func(c *gin.Context) {
3636
db := repo.GetDB()
3737

3838
var users []models.User
39-
res := db.Where(`"name" ILIKE ? OR "alias" ILIKE ?`, "%"+query.Keyword+"%", "%"+query.Keyword+"%").
39+
res := db.Where(`"name" LIKE ? OR "alias" LIKE ?`, "%"+query.Keyword+"%", "%"+query.Keyword+"%").
4040
Order(`"name" ASC`).
4141
Limit(LimitResultCount).
4242
Offset(0).

0 commit comments

Comments
 (0)