xjgorm

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Camel2Case

func Camel2Case(name string) string

驼峰式写法转为下划线写法

func Case2Camel

func Case2Camel(name string) string

下划线写法转为驼峰写法

func Lcfirst

func Lcfirst(str string) string

首字母小写

func Ucfirst

func Ucfirst(str string) string

首字母大写

Types

type BaseMapper

type BaseMapper struct {
	Gorm *gorm.DB
}

func (BaseMapper) Count

func (this BaseMapper) Count(wrapper *xjtypes.GormWrapper, item interface{}, total *int64) error

func (BaseMapper) Create

func (this BaseMapper) Create(item interface{}) (int64, error)

func (BaseMapper) Delete

func (this BaseMapper) Delete(wrapper *xjtypes.GormWrapper, item interface{}) (int64, error)

func (BaseMapper) Find

func (this BaseMapper) Find(wrapper *xjtypes.GormWrapper, list interface{}) error

func (BaseMapper) FindCount

func (this BaseMapper) FindCount(wrapper *xjtypes.GormWrapper, list interface{}, total *int64) error

func (BaseMapper) FindCount2

func (this BaseMapper) FindCount2(wrapper *xjtypes.GormWrapper, list interface{}, total *int64) error

func (BaseMapper) FindCount3

func (this BaseMapper) FindCount3(wrapper *xjtypes.GormWrapper, list interface{}, total *int64) error

func (BaseMapper) FindString

func (this BaseMapper) FindString(sql string, args []interface{}) (list []map[string]string, err error)

func (BaseMapper) First

func (this BaseMapper) First(wrapper *xjtypes.GormWrapper, item interface{}) error

func (BaseMapper) FirstString

func (this BaseMapper) FirstString(sql string, args []interface{}) (item map[string]string, err error)

func (BaseMapper) Save

func (this BaseMapper) Save(item interface{}) (int64, error)

func (BaseMapper) Update

func (this BaseMapper) Update(wrapper *xjtypes.GormWrapper, item interface{}, column string, value interface{}) (int64, error)

func (BaseMapper) Updates

func (this BaseMapper) Updates(wrapper *xjtypes.GormWrapper, item interface{}, values interface{}) (int64, error)

func (BaseMapper) UpdatesItem

func (this BaseMapper) UpdatesItem(wrapper *xjtypes.GormWrapper, item interface{}) (int64, error)

func (BaseMapper) UpdatesTable

func (this BaseMapper) UpdatesTable(wrapper *xjtypes.GormWrapper, table string) (int64, error)

type Buffer

type Buffer struct {
	*bytes.Buffer
}

内嵌bytes.Buffer,支持连写

func NewBuffer

func NewBuffer() *Buffer

func (*Buffer) Append

func (b *Buffer) Append(i interface{}) *Buffer

type TxMapper

type TxMapper struct{}

func (TxMapper) Count

func (this TxMapper) Count(tx *gorm.DB, wrapper *xjtypes.GormWrapper, item interface{}, total *int64) error

func (TxMapper) Create

func (this TxMapper) Create(tx *gorm.DB, item interface{}) (int64, error)

func (TxMapper) Delete

func (this TxMapper) Delete(tx *gorm.DB, wrapper *xjtypes.GormWrapper, item interface{}) (int64, error)

func (TxMapper) Find

func (this TxMapper) Find(tx *gorm.DB, wrapper *xjtypes.GormWrapper, list interface{}) error

func (TxMapper) FindCount

func (this TxMapper) FindCount(tx *gorm.DB, wrapper *xjtypes.GormWrapper, list interface{}, total *int64) error

func (TxMapper) FindCount2

func (this TxMapper) FindCount2(tx *gorm.DB, wrapper *xjtypes.GormWrapper, list interface{}, total *int64) error

func (TxMapper) FindString

func (this TxMapper) FindString(tx *gorm.DB, sql string, args []interface{}) (list []map[string]string, err error)

func (TxMapper) First

func (this TxMapper) First(tx *gorm.DB, wrapper *xjtypes.GormWrapper, item interface{}) error

func (TxMapper) FirstString

func (this TxMapper) FirstString(tx *gorm.DB, sql string, args []interface{}) (item map[string]string, err error)

func (TxMapper) Save

func (this TxMapper) Save(tx *gorm.DB, item interface{}) (int64, error)

func (TxMapper) Update

func (this TxMapper) Update(tx *gorm.DB, wrapper *xjtypes.GormWrapper, item interface{}, column string, value interface{}) (int64, error)

func (TxMapper) Updates

func (this TxMapper) Updates(tx *gorm.DB, wrapper *xjtypes.GormWrapper, item interface{}, values interface{}) (int64, error)

func (TxMapper) UpdatesItem

func (this TxMapper) UpdatesItem(tx *gorm.DB, wrapper *xjtypes.GormWrapper, item interface{}) (int64, error)

func (TxMapper) UpdatesTable

func (this TxMapper) UpdatesTable(tx *gorm.DB, wrapper *xjtypes.GormWrapper, table string) (int64, error)

Jump to

Keyboard shortcuts

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