gormutil

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2022 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 .

Types

type SQLCollector added in v1.3.0

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

func NewSQLCollector added in v1.3.0

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

func (SQLCollector) Trace added in v1.3.0

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