File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ This is an plus version of gorm, which is similar to the mybatis-plus syntax.
7
7
8
8
go get github.com/acmestack/gorm-plus
9
9
10
- go install github.com/acmestack/gorm-plus/cmd/gplus
10
+ go install github.com/acmestack/gorm-plus/cmd/gplus@latest
11
11
12
12
## 生成工具gplus
13
13
@@ -16,7 +16,7 @@ go install github.com/acmestack/gorm-plus/cmd/gplus
16
16
我们在使用gorm的时候,是需要手写字段名称的,例如这样:
17
17
18
18
``` go
19
- gormDb.Where (" username = ? age = ?" ," zhangsan" ,18 )
19
+ gormDb.Where (" username = ? and age = ?" ," zhangsan" ,18 )
20
20
```
21
21
22
22
一旦名称长,非常容易误写,而且如果有字段名称修改的话,还需要全局搜索一个个地修改,比较麻烦。
@@ -35,7 +35,7 @@ gplus 会在输入的路径下面生成 `zz_gen.column.go`文件。
35
35
36
36
例如:
37
37
38
- 在example目录下创建了了一个users.go 目录,执行 ` gplus en paths=./eample `
38
+ 在example目录下创建了了一个users.go 目录,执行 ` gplus gen paths=./eample `
39
39
40
40
users.go
41
41
You can’t perform that action at this time.
0 commit comments