Documentation ¶
Index ¶
- Constants
- Variables
- func Assign(name string, config Config, plugins ...gorm.Plugin) error
- func CloseHook() func()
- func DBLimit(pageNum int, pageSize int) func(db *gorm.DB) *gorm.DB
- func GetGormDB(ctx context.Context, name string) (*gorm.DB, error)
- func SetMaxPageSize(pageSize int)
- func SetPageSize(pageSize int)
- type Config
Constants ¶
View Source
const (
DefaultName = "default"
)
Variables ¶
View Source
var AppDatabase = &database{ pool: make(map[string]*gorm.DB), }
Functions ¶
func SetMaxPageSize ¶
func SetMaxPageSize(pageSize int)
func SetPageSize ¶
func SetPageSize(pageSize int)
Types ¶
Click to show internal directories.
Click to hide internal directories.