Skip to content

Commit 05d7357

Browse files
author
alex cai
committed
增加注释
1 parent ba837ca commit 05d7357

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

models/template.go

+1
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ func do{{.Name|Format2StructName}}QueryRow(db *sql.DB, queryString string) ({{.N
6464
}
6565
6666
// 根据where条件查询多行记录
67+
// 如果查询所有记录,只需要where="1"
6768
func {{.Name|Format2StructName}}QueryWhere(db *sql.DB, where string) ({{.Name}} []*{{.Name|Format2StructName}}Table, err error) {
6869
queryString := "SELECT " + {{.Name|Format2Title}}SelectFields + " FROM {{.Name|AddBackquote}} WHERE " + where
6970
return do{{.Name|Format2StructName}}Query(db, queryString)

0 commit comments

Comments
 (0)