gormx

package
v0.5.0-gz1 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OrderAscending  = "ascending"
	OrderAsc        = "asc"
	OrderDescending = "descending"
	OrderDesc       = "desc"
)

Variables

View Source
var Unscoped = func(db *gorm.DB) *gorm.DB { return db.Unscoped() }

Functions

func CamelToSnake added in v0.5.0

func CamelToSnake(s string) string

CamelToSnake 驼峰转换为下划线

func DynamicSort added in v0.5.0

func DynamicSort(tableName, sortBy, sortOrder string, defaultSort ...field.Expr) field.Expr

func ILike added in v0.4.5

func ILike(column *string) string

func ILikeHelper added in v0.4.5

func ILikeHelper(column string) string

func InitDB

func InitDB() *gorm.DB

func Page added in v0.4.5

func Page[T int | int8 | int16 | int32 | int64](current, pageSize T) (offset, limit int)

Types

This section is empty.

Directories

Path Synopsis
source
g

Jump to

Keyboard shortcuts

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