Skip to content

Commit

Permalink
f-fix spell (zeromicro#381)
Browse files Browse the repository at this point in the history
Co-authored-by: chenwenjie <chenwenjie@zzstc.cn>
  • Loading branch information
wenj91 and chenwenjie authored Jan 13, 2021
1 parent 7f49bd8 commit 3285436
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions tools/goctl/model/sql/gen/insert.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ func genInsert(table Table, withCache bool) (string, string, error) {

expressions := make([]string, 0)
expressionValues := make([]string, 0)
for _, filed := range table.Fields {
camel := filed.Name.ToCamel()
for _, field := range table.Fields {
camel := field.Name.ToCamel()
if camel == "CreateTime" || camel == "UpdateTime" {
continue
}
if filed.IsPrimaryKey && table.PrimaryKey.AutoIncrement {
if field.IsPrimaryKey && table.PrimaryKey.AutoIncrement {
continue
}
expressions = append(expressions, "?")
Expand Down
4 changes: 2 additions & 2 deletions tools/goctl/model/sql/gen/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ const (
category = "model"
deleteTemplateFile = "delete.tpl"
deleteMethodTemplateFile = "interface-delete.tpl"
fieldTemplateFile = "filed.tpl"
fieldTemplateFile = "field.tpl"
findOneTemplateFile = "find-one.tpl"
findOneMethodTemplateFile = "interface-find-one.tpl"
findOneByFieldTemplateFile = "find-one-by-field.tpl"
findOneByFieldMethodTemplateFile = "interface-find-one-by-field.tpl"
findOneByFieldExtraMethodTemplateFile = "find-one-by-filed-extra-method.tpl"
findOneByFieldExtraMethodTemplateFile = "find-one-by-field-extra-method.tpl"
importsTemplateFile = "import.tpl"
importsWithNoCacheTemplateFile = "import-no-cache.tpl"
insertTemplateFile = "insert.tpl"
Expand Down
6 changes: 3 additions & 3 deletions tools/goctl/model/sql/gen/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ import (

func genUpdate(table Table, withCache bool) (string, string, error) {
expressionValues := make([]string, 0)
for _, filed := range table.Fields {
camel := filed.Name.ToCamel()
for _, field := range table.Fields {
camel := field.Name.ToCamel()
if camel == "CreateTime" || camel == "UpdateTime" {
continue
}
if filed.IsPrimaryKey {
if field.IsPrimaryKey {
continue
}
expressionValues = append(expressionValues, "data."+camel)
Expand Down

0 comments on commit 3285436

Please sign in to comment.