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 ba97558
Show file tree
Hide file tree
Showing 13 changed files with 41 additions and 4 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
3 changes: 3 additions & 0 deletions tests/.expect/dal_3/query/banks.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions tests/.expect/dal_3/query/credit_cards.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions tests/.expect/dal_3/query/customers.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions tests/.expect/dal_3/query/people.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions tests/.expect/dal_3/query/users.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion tests/.expect/dal_4/query/banks.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion tests/.expect/dal_4/query/credit_cards.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion tests/.expect/dal_4/query/customers.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion tests/.expect/dal_4/query/people.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions tests/.expect/dal_4/query/users.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions tests/.expect/dal_5/query/users.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions tests/.expect/dal_6/query/users.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ba97558

Please sign in to comment.