gormx

package
v1.2.85 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 29, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AlterColumnsWithMySQL added in v1.2.48

func AlterColumnsWithMySQL(db *gorm.DB, tableName string, fields []*schema.Field) error

批量修改列

func CreateIndexs added in v1.2.48

func CreateIndexs(tx *gorm.DB, tableName string, idxs []schema.Index) error

批量定义索引

func Enabled added in v1.2.74

func Enabled(enabled *bool) func(tx *gorm.DB) *gorm.DB

func GetMonthTableName added in v1.2.45

func GetMonthTableName(baseTableName string) string

获取当前月的表名 baseTableName_yearmonth

func GetMonthTableNameWithYearAndMonth added in v1.2.46

func GetMonthTableNameWithYearAndMonth(baseTableName string, year int, month int) string

获取指定年月的表名 baseTableName_yearmonth

func GetYearTableName added in v1.2.45

func GetYearTableName(baseTableName string) string

获取当前年的表名 baseTableName_year

func GetYearTableNameWithYear added in v1.2.46

func GetYearTableNameWithYear(baseTableName string, year int) string

获取指定年的表名 baseTableName_year

func Paginate

func Paginate(page, size int) func(db *gorm.DB) *gorm.DB

func Table added in v1.2.45

func Table(tableName string) func(db *gorm.DB) *gorm.DB

func TableSubffix

func TableSubffix(tableName, subffix string) func(db *gorm.DB) *gorm.DB

func Undeleted added in v1.2.51

func Undeleted(db *gorm.DB) *gorm.DB

func WhereDateRange added in v1.2.42

func WhereDateRange(field string, from, to interface{}) func(db *gorm.DB) *gorm.DB

from/to 非值类型

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL