File tree Expand file tree Collapse file tree 3 files changed +8
-2
lines changed Expand file tree Collapse file tree 3 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 2
2
3
3
All notable changes to this project will be documented in this file.
4
4
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
+
5
11
### v0.1.0
6
12
7
13
> 22 October 2022
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ func Register(repo repository.Repository) func(c *gin.Context) {
56
56
}
57
57
58
58
var findExtAlias models.User
59
- res = tx .Where (`"alias" ILIKE ?` , bodyParams .Alias ).First (& findExtAlias )
59
+ res = tx .Where (`"alias" LIKE ?` , bodyParams .Alias ).First (& findExtAlias )
60
60
61
61
if res .RowsAffected > 0 {
62
62
return errors .New ("alias already exist" )
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ func UserQueries(repo repository.Repository) func(c *gin.Context) {
36
36
db := repo .GetDB ()
37
37
38
38
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 + "%" ).
40
40
Order (`"name" ASC` ).
41
41
Limit (LimitResultCount ).
42
42
Offset (0 ).
You can’t perform that action at this time.
0 commit comments