xorm

package
v0.0.0-...-efd9455 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Count

func Count(tx *gorm.DB, model interface{}, where string, args ...interface{}) (int64, error)

Count 获取数量

func DetailByWhere

func DetailByWhere(tx *gorm.DB, model interface{}, wheres ...GormWhere) error

func GetClient

func GetClient(
	cfg global.MysqlConfig,
) *gorm.DB

func Insert

func Insert(tx *gorm.DB, model interface{}) error

func ListWithPaging

func ListWithPaging(
	tx *gorm.DB,
	models interface{},
	model interface{},
	no int, size int,
	where string, args ...interface{}) (int64, error)

func Paging

func Paging(tx *gorm.DB, no int, size int) *gorm.DB

func Transaction

func Transaction(tx *gorm.DB, fs ...func(tx *gorm.DB) error) error

Types

type GormWhere

type GormWhere struct {
	Where string
	// contains filtered or unexported fields
}

func NewGormWhere

func NewGormWhere() []GormWhere

func Where

func Where(where string, args ...interface{}) GormWhere

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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