Documentation ¶
Index ¶
- Variables
- func IsSpecifyIndexSequence(fields []Field) bool
- func ParseIndex(index string) (string, int, bool)
- func ParseTagSetting(str string) map[string][]string
- type BaseInfoOfGenCode
- type BatchFetchTemplateParam
- type DbFieldTempalteParam
- type FetchListTemplateParam
- type FetchTemplateParam
- type Field
- type Model
- type Scanner
- type TableNameTemplateParam
- type UniqueDeleteTemplateParam
- type UniqueFetchTemplateParam
- type UniquePhysicsDeleteTemplateParam
- type UniqueUpdateWithMapTemplateParam
- type UniqueUpdateWithStructTemplateParam
Constants ¶
This section is empty.
Variables ¶
View Source
var BatchFetchTemplate = `` /* 853-byte string literal not displayed */
View Source
var CreateTemplate = `` /* 1968-byte string literal not displayed */
View Source
var DbFiledTemplate = `` /* 5043-byte string literal not displayed */
View Source
var FetchByUniqueInexTemplate = `` /* 858-byte string literal not displayed */
View Source
var FetchListTemplate = `` /* 2035-byte string literal not displayed */
View Source
var FetchTemplate = `` /* 754-byte string literal not displayed */
View Source
var TableNameTemplate = `` /* 992-byte string literal not displayed */
Functions ¶
func IsSpecifyIndexSequence ¶
func ParseIndex ¶
ParseIndex indexName[0] -> return indexname, 0
func ParseTagSetting ¶
Types ¶
type BaseInfoOfGenCode ¶
type BatchFetchTemplateParam ¶
type BatchFetchTemplateParam struct { FetchTemplateParam FieldType string ParamField string ReceiverListName string StructListName string }
type DbFieldTempalteParam ¶
type DbFieldTempalteParam struct { StructName string ReceiverName string NewStructFields []string NewStructValue []string NoUniqueIndexFields []string StructFieldAndDBField []string DBFieldAndStructField []string EnabledFieldType string UpdateTimeFieldType string CreateTimeFieldType string HasEnabledField bool HasUpdateTimeField bool HasCreateTimeField bool }
type FetchListTemplateParam ¶
type FetchTemplateParam ¶
type FetchTemplateParam struct { TableNameTemplateParam Field string DbField string ReceiverListName string StructListName string }
type Model ¶
type Model struct { Pkg *types.Package Name string Fields []*Field IsDbModel bool UniqueIndex map[string][]Field NormalIndex map[string][]Field PrimaryIndex []Field HasCreateTimeField bool HasUpdateTimeField bool HasEnabledField bool EnabledFieldType string CreateTimeFieldType string UpdateTimeFieldType string DbCreateTimeField string DbEnabledField string DbUpdateTimeField string FuncMapContent map[string]string Deps []string }
func (*Model) GenerateFile ¶
func (model *Model) GenerateFile()
type TableNameTemplateParam ¶
type TableNameTemplateParam struct { BaseInfoOfGenCode StructName string ReceiverName string PackageName string HasCreateTimeField bool HasUpdateTimeField bool HasEnabledField bool EnabledFieldType string CreateTimeFieldType string UpdateTimeFieldType string DbEnabledField string DbCreateTimeField string DbUpdateTimeField string NeedCreateTableNameFunc bool TableNameStr string GlobalPkgPath string }
type UniqueDeleteTemplateParam ¶
type UniqueDeleteTemplateParam struct { TableNameTemplateParam UnionField string }
type UniqueFetchTemplateParam ¶
type UniqueFetchTemplateParam struct { TableNameTemplateParam UnionField string }
type UniquePhysicsDeleteTemplateParam ¶
type UniquePhysicsDeleteTemplateParam struct { TableNameTemplateParam UnionField string }
type UniqueUpdateWithMapTemplateParam ¶
type UniqueUpdateWithMapTemplateParam struct { TableNameTemplateParam UnionField string }
type UniqueUpdateWithStructTemplateParam ¶
type UniqueUpdateWithStructTemplateParam struct { TableNameTemplateParam UnionField string }
Click to show internal directories.
Click to hide internal directories.