callbacks

package
v0.20.14 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2021 License: MIT Imports: 8 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AfterCreate

func AfterCreate(db *dao.DB)

func AfterDelete

func AfterDelete(db *dao.DB)

func AfterQuery

func AfterQuery(db *dao.DB)

func AfterUpdate

func AfterUpdate(db *dao.DB)

func BeforeCreate

func BeforeCreate(db *dao.DB)

func BeforeDelete

func BeforeDelete(db *dao.DB)

func BeforeUpdate

func BeforeUpdate(db *dao.DB)

func BeginTransaction

func BeginTransaction(db *dao.DB)

func BuildQuerySQL

func BuildQuerySQL(db *dao.DB)

func CommitOrRollbackTransaction

func CommitOrRollbackTransaction(db *dao.DB)

func ConvertMapToValuesForCreate

func ConvertMapToValuesForCreate(stmt *dao.Statement, mapValue map[string]interface{}) (values clause.Values)

ConvertMapToValuesForCreate convert map to values

func ConvertSliceOfMapToValuesForCreate

func ConvertSliceOfMapToValuesForCreate(stmt *dao.Statement, mapValues []map[string]interface{}) (values clause.Values)

ConvertSliceOfMapToValuesForCreate convert slice of map to values

func ConvertToAssignments

func ConvertToAssignments(stmt *dao.Statement) (set clause.Set)

ConvertToAssignments convert to update assignments

func ConvertToCreateValues

func ConvertToCreateValues(stmt *dao.Statement) (values clause.Values)

ConvertToCreateValues convert to create values

func Create

func Create(config *Options) func(db *dao.DB)

func CreateWithReturning

func CreateWithReturning(db *dao.DB)

func Delete

func Delete(db *dao.DB)

func DeleteBeforeAssociations

func DeleteBeforeAssociations(db *dao.DB)

func Preload

func Preload(db *dao.DB)

func Query

func Query(db *dao.DB)

func RawExec

func RawExec(db *dao.DB)

func RegisterDefaultCallbacks

func RegisterDefaultCallbacks(db *dao.DB, config *Options)

func RowQuery

func RowQuery(db *dao.DB)

func SaveAfterAssociations

func SaveAfterAssociations(create bool) func(db *dao.DB)

func SaveBeforeAssociations

func SaveBeforeAssociations(create bool) func(db *dao.DB)

func SetupUpdateReflectValue

func SetupUpdateReflectValue(db *dao.DB)

func Update

func Update(db *dao.DB)

Types

type AfterCreateInterface

type AfterCreateInterface interface {
	AfterCreate(*dao.DB) error
}

type AfterDeleteInterface

type AfterDeleteInterface interface {
	AfterDelete(*dao.DB) error
}

type AfterFindInterface

type AfterFindInterface interface {
	AfterFind(*dao.DB) error
}

type AfterSaveInterface

type AfterSaveInterface interface {
	AfterSave(*dao.DB) error
}

type AfterUpdateInterface

type AfterUpdateInterface interface {
	AfterUpdate(*dao.DB) error
}

type BeforeCreateInterface

type BeforeCreateInterface interface {
	BeforeCreate(*dao.DB) error
}

type BeforeDeleteInterface

type BeforeDeleteInterface interface {
	BeforeDelete(*dao.DB) error
}

type BeforeSaveInterface

type BeforeSaveInterface interface {
	BeforeSave(*dao.DB) error
}

type BeforeUpdateInterface

type BeforeUpdateInterface interface {
	BeforeUpdate(*dao.DB) error
}

type Options

type Options struct {
	LastInsertIDReversed bool
	WithReturning        bool
}

Jump to

Keyboard shortcuts

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