We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ba837ca commit 05d7357Copy full SHA for 05d7357
models/template.go
@@ -64,6 +64,7 @@ func do{{.Name|Format2StructName}}QueryRow(db *sql.DB, queryString string) ({{.N
64
}
65
66
// 根据where条件查询多行记录
67
+// 如果查询所有记录,只需要where="1"
68
func {{.Name|Format2StructName}}QueryWhere(db *sql.DB, where string) ({{.Name}} []*{{.Name|Format2StructName}}Table, err error) {
69
queryString := "SELECT " + {{.Name|Format2Title}}SelectFields + " FROM {{.Name|AddBackquote}} WHERE " + where
70
return do{{.Name|Format2StructName}}Query(db, queryString)
0 commit comments