gormutil

package
v1.0.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFieldToColumnMap

func GetFieldToColumnMap(typ reflect.Type) map[string]string

GetFieldToColumnMap .

func GetQueryFilterByFields

func GetQueryFilterByFields(db *gorm.DB, fieldColumns map[string]string, fields map[string]interface{}) (*gorm.DB, error)

GetQueryFilterByFields .

func GetQueryFilterByTypeFields

func GetQueryFilterByTypeFields(db *gorm.DB, typ interface{}, fields map[string]interface{}) (*gorm.DB, error)

GetQueryFilterByFields .

func GetQueryLikeFilterByFields

func GetQueryLikeFilterByFields(db *gorm.DB, fieldColumns map[string]string, fields map[string]interface{}) (*gorm.DB, error)

GetQueryLikeFilterByFields .

Types

type SQLCollector

type SQLCollector struct {
	logger.Interface
	// contains filtered or unexported fields
}

func NewSQLCollector

func NewSQLCollector(filename string, baseLogger logger.Interface) (*SQLCollector, error)

func (SQLCollector) Trace

func (c SQLCollector) Trace(ctx context.Context, begin time.Time, fc func() (string, int64), err error)

Jump to

Keyboard shortcuts

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