util

package
v0.0.0-...-b5dfc24 Latest Latest
Warning

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

Go to latest
Published: May 4, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	QueryFp *os.File
	Y       = "y"
	Yes     = "yes"
)

variables

Functions

func FieldType

func FieldType(refField reflect.StructField) (fType string)

FieldType will return field type

func GetAfterDeleteTriggerName

func GetAfterDeleteTriggerName(tableName string) string

GetAfterDeleteTriggerName will return after delete trigger name

func GetAfterInsertTriggerName

func GetAfterInsertTriggerName(tableName string) string

GetAfterInsertTriggerName will return after insert trigger name

func GetAfterUpdateTriggerName

func GetAfterUpdateTriggerName(tableName string) string

GetAfterUpdateTriggerName will return after update trigger name

func GetBeforeInsertTriggerName

func GetBeforeInsertTriggerName(tableName string) string

GetBeforeInsertTriggerName will return before insert trigger name

func GetChoice

func GetChoice(sql string, skipPrompt bool) (choice string)

GetChoice will ask user choice

func GetHistoryTableName

func GetHistoryTableName(tableName string) string

GetHistoryTableName will reutrn history table name

func GetStrByLen

func GetStrByLen(str string, n int) string

GetStrByLen will return string till given length

func GetStructField

func GetStructField(model interface{}) (fields map[reflect.Value]reflect.StructField)

GetStructField will return struct fields

func IsAfterUpdateTriggerExists

func IsAfterUpdateTriggerExists(tx *pg.Tx, tName string) (exists bool, err error)

IsAfterUpdateTriggerExists will check if after update triger exists

func RefTable

func RefTable(refField reflect.StructField) (refTable string)

RefTable will reutrn reference table

func SkipTag

func SkipTag(object interface{}) (flag bool)

SkipTag will check skiptag exists in model or not

Types

This section is empty.

Jump to

Keyboard shortcuts

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