genUtils

package
v0.0.0-...-7bb2ca5 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ColumnNameBaseEntity = []string{"create_by", "create_time", "del_flag", "update_by", "update_time"}

ColumnNameBaseEntity 在BaseEntity字段

View Source
var ColumnNameNotEdit = []string{"id", "create_by", "create_time", "del_flag", "update_by", "update_time"}

ColumnNameNotEdit 页面不需要编辑字段

View Source
var ColumnNameNotList = []string{"id", "create_by", "create_time", "del_flag", "update_by", "update_time"}

ColumnNameNotList 页面不需要显示的列表字段

View Source
var ColumnNameNotQuery = []string{"id", "create_by", "create_time", "del_flag", "update_by", "update_time", "remark"}

ColumnNameNotQuery 页面不需要查询字段

View Source
var ColumnTypeNumber = []string{"tinyint", "smallint", "mediumint", "int", "number", "integer", "bigint", "float", "float", "double", "decimal"}

ColumnTypeNumber 数据库数字类型

View Source
var ColumnTypeStr = []string{"char", "varchar", "narchar", "varchar2", "tinytext", "text", "mediumtext", "longtext"}

ColumnTypeStr 数据库字符串类型

View Source
var ColumnTypeTime = []string{"datetime", "time", "date", "timestamp"}

ColumnTypeTime 数据库时间类型

Functions

func CheckNameColumn

func CheckNameColumn(columnName string) bool

CheckNameColumn 检查字段名后4位是否是name

func CheckSexColumn

func CheckSexColumn(columnName string) bool

CheckSexColumn 检查字段名后3位是否是sex

func CheckStatusColumn

func CheckStatusColumn(columnName string) bool

CheckStatusColumn 检查字段名后6位是否是status

func CheckTypeColumn

func CheckTypeColumn(columnName string) bool

CheckTypeColumn 检查字段名后4位是否是type

func ConvertClassName

func ConvertClassName(tableName string) string

func GetBusinessName

func GetBusinessName(tableName string) string

func GetColumnLength

func GetColumnLength(columnType string) int

GetColumnLength 获取字段长度

func GetDbType

func GetDbType(columnType string) string

GetDbType 获取数据库类型字段

func IsBaseEntity

func IsBaseEntity(value string) bool

IsBaseEntity 在BaseEntity里面

func IsExistInArray

func IsExistInArray(value string, array []string) bool

IsExistInArray 判断string 是否存在在数组中

func IsNotEdit

func IsNotEdit(value string) bool

IsNotEdit 页面不需要编辑字段

func IsNotList

func IsNotList(value string) bool

IsNotList 页面不需要显示的列表字段

func IsNotQuery

func IsNotQuery(value string) bool

IsNotQuery 页面不需要查询字段

func IsNumberObject

func IsNumberObject(value string) bool

IsNumberObject 判断是否是数据库数字类型

func IsStringObject

func IsStringObject(value string) bool

IsStringObject 判断是否是数据库字符串类型

func IsTimeObject

func IsTimeObject(value string) bool

IsTimeObject 判断是否是数据库时间类型

Types

This section is empty.

Jump to

Keyboard shortcuts

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