Documentation ¶
Index ¶
Constants ¶
View Source
const ( COUMT_IS_EMPTY = -1 // 尚未计数 COUMT_IS_DYNAMIC = -2 // 不缓存计数 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Sharding ¶
type Sharding struct { IsTableNameDesc bool DbNameMatch string TableFilter func(dbname, table string) bool *gorm.DB // contains filtered or unexported fields }
func (*Sharding) CountSharding ¶
func (s *Sharding) CountSharding(model ShardingModel) (count int64)
Count all
func (*Sharding) PaginateSharding ¶
func (s *Sharding) PaginateSharding(model ShardingModel, page, size int, fetch FetchFunc) error
Select step by step.
type ShardingModel ¶
type ShardingModel interface {
BaseTableName() string
}
Click to show internal directories.
Click to hide internal directories.