Skip to content

Commit 7881bf4

Browse files
committed
Add struct TotalRows (#68)
1 parent 949b920 commit 7881bf4

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

go.mod

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
module github.com/x-ream/sqlxb
22

3-
go 1.15
4-
3+
go 1.15

page_builder.go

+4
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ type PageBuilder struct {
2727
condition PageCondition
2828
}
2929

30+
type TotalRows struct {
31+
Count int64 `db:"COUNT(*)"`
32+
}
33+
3034
func (pb *PageBuilder) Page(page uint) *PageBuilder {
3135
pb.condition.page = page
3236
return pb

0 commit comments

Comments
 (0)