Skip to content

Commit

Permalink
feat: interface template add method Rows
Browse files Browse the repository at this point in the history
  • Loading branch information
qqxhb committed Dec 19, 2024
1 parent a31c34b commit d633643
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/template/struct.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,8 @@ type I{{.ModelStructName}}Do interface {
FirstOrCreate() (*{{.StructInfo.Package}}.{{.StructInfo.Type}}, error)
FindByPage(offset int, limit int) (result []*{{.StructInfo.Package}}.{{.StructInfo.Type}}, count int64, err error)
ScanByPage(result interface{}, offset int, limit int) (count int64, err error)
Rows() (*sql.Rows, error)
Row() *sql.Row
Scan(result interface{}) (err error)
Returning(value interface{}, columns ...string) I{{.ModelStructName}}Do
UnderlyingDB() *gorm.DB
Expand Down

0 comments on commit d633643

Please sign in to comment.