Documentation
¶
Index ¶
- func ColumnNamePattern(name string) string
- func CreateLogger(logFile string) (*slog.Logger, error)
- func IsFieldHasSchema(valueOf reflect.Value, i int) bool
- func MakeDirForFile(filename string) (err error)
- func ParseTableNameByType(typeOf reflect.Type) string
- func ParseTableNameByValue(valueOf reflect.Value) string
- func TableNameMethod(valueOf reflect.Value) string
- func TableNamePattern(name string) string
- func ToSnakeCase(name string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ColumnNamePattern ¶
ColumnNamePattern is the default name patterning for mapping struct fields to table columns
func CreateLogger ¶
CreateLogger create logger by log file If log file directory not exist, create it
func IsFieldHasSchema ¶
IsFieldHasSchema check if field has schema tag or schema suffix
func MakeDirForFile ¶
MakeDirForFile create directory for file if not exist
func ParseTableNameByType ¶
ParseTableNameByType parse table name by type
func ParseTableNameByValue ¶
ParseTableNameByValue parse table name by value
func TableNameMethod ¶
TableNameMethod try to get table name from method TableName If method TableName is not found, return empty string
func TableNamePattern ¶
TableNamePattern is the default name patterning for mapping struct to table
func ToSnakeCase ¶
ToSnakeCase convert camelCase or PascalCase to snake_case
Types ¶
This section is empty.