Versions in this module Expand all Collapse all v1 v1.1.21 Jan 15, 2024 v1.1.12 Jan 15, 2024 v1.1.11 Jan 14, 2024 v1.1.10 Jan 14, 2024 v1.1.9 Jan 13, 2024 v1.1.8 Jan 13, 2024 v1.1.7 Jan 12, 2024 v1.1.5 Jan 12, 2024 v1.1.4 Jan 12, 2024 v1.1.3 Dec 15, 2023 v1.1.2 Dec 9, 2023 v1.1.1 Dec 9, 2023 v1.1.0 Dec 9, 2023 v1.0.28 Jan 31, 2024 v1.0.26 Jan 31, 2024 v1.0.25 Jan 31, 2024 v1.0.24 Jan 22, 2024 v1.0.23 Jan 22, 2024 v1.0.22 Jan 21, 2024 Changes in this version + func GetStructNames(bases []*QueryStructMeta) (names []string) + func ParseStructRelationShip(relationship *schema.Relationships) []field.Relation + type Clause interface + Create func() string + String func() string + type ElseClause struct + func (e ElseClause) Create() string + func (e ElseClause) Finish() string + func (e ElseClause) String() (res string) + type FieldParser interface + GetFieldGenType func(f *schema.Field) string + type ForClause struct + ForRange ForRange + Value []Clause + func (f ForClause) Create() string + func (f ForClause) Finish() string + func (f ForClause) String() string + type ForRange struct + func (f *ForRange) String() string + type ITableInfo interface + GetTableColumns func(schemaName string, tableName string) (result []*model.Column, err error) + GetTableIndex func(schemaName string, tableName string) (indexes []gorm.Index, err error) + type IfClause struct + Value []Clause + func (i IfClause) Create() string + func (i IfClause) Finish() string + func (i IfClause) String() string + type InterfaceMethod struct + Doc string + GormOption string + HasForParams bool + InterfaceName string + MethodName string + OriginStruct parser.Param + Package string + Params []parser.Param + Result []parser.Param + ResultData parser.Param + S string + SQLParams []parser.Param + SQLString string + Section *Section + Table string + TargetStruct string + func BuildDIYMethod(f *parser.InterfaceSet, s *QueryStructMeta, data []*InterfaceMethod) (checkResults []*InterfaceMethod, err error) + func (m *InterfaceMethod) DocComment() string + func (m *InterfaceMethod) FuncSign() string + func (m *InterfaceMethod) GetAssertInTmpl() string + func (m *InterfaceMethod) GetParamInTmpl() string + func (m *InterfaceMethod) GetResultParamInTmpl() string + func (m *InterfaceMethod) GetTestParamInTmpl() string + func (m *InterfaceMethod) GetTestResultParamInTmpl() string + func (m *InterfaceMethod) GormRunMethodName() string + func (m *InterfaceMethod) HasGotPoint() bool + func (m *InterfaceMethod) HasNeedNewResult() bool + func (m *InterfaceMethod) HasSQLData() bool + func (m *InterfaceMethod) IsRepeatFromDifferentInterface(newMethod *InterfaceMethod) bool + func (m *InterfaceMethod) IsRepeatFromSameInterface(newMethod *InterfaceMethod) bool + func (m *InterfaceMethod) ReturnError() bool + func (m *InterfaceMethod) ReturnNothing() bool + func (m *InterfaceMethod) ReturnRowsAffected() bool + func (m *InterfaceMethod) ReturnSQLResult() bool + func (m *InterfaceMethod) ReturnSQLRow() bool + func (m *InterfaceMethod) ReturnSQLRows() bool + func (m *InterfaceMethod) SQLParamName(param string) string + type QueryStructMeta struct + Fields []*model.Field + FileName string + Generated bool + ImportPkgPaths []string + ModelMethods []*parser.Method + ModelStructName string + QueryStructName string + S string + Source model.SourceCode + StructInfo parser.Param + TableComment string + TableName string + func ConvertStructs(db *gorm.DB, structs ...interface{}) (metas []*QueryStructMeta, err error) + func GetQueryStructMeta(db *gorm.DB, conf *model.Config) (*QueryStructMeta, error) + func GetQueryStructMetaFromObject(obj helper.Object, conf *model.Config) (*QueryStructMeta, error) + func (b *QueryStructMeta) HasField() bool + func (b *QueryStructMeta) QueryStructComment() string + func (b *QueryStructMeta) Relations() (result []field.Relation) + func (b *QueryStructMeta) ReturnObject() string + func (b *QueryStructMeta) ReviseDIYMethod() error + func (b *QueryStructMeta) ReviseFieldName() + func (b *QueryStructMeta) ReviseFieldNameFor(keywords model.KeyWord) + func (b *QueryStructMeta) StructComment() string + func (b QueryStructMeta) IfaceMode(on bool) *QueryStructMeta + type SQLClause struct + Value []string + func (s SQLClause) Create() string + func (s SQLClause) Finish() string + func (s SQLClause) String() string + type Section struct + ClauseTotal map[model.Status]int + Tmpls []string + func NewSection() *Section + func (s *Section) BuildSQL() ([]Clause, error) + func (s *Section) GetName(status model.Status) string + func (s *Section) HasMore() bool + func (s *Section) IsNull() bool + func (s *Section) SubIndex() + type SetClause struct + Value []Clause + func (s SetClause) Create() string + func (s SetClause) Finish(name string) string + func (s SetClause) String() string + type TrimClause struct + Value []Clause + func (s TrimClause) Create() string + func (s TrimClause) Finish(name string) string + func (s TrimClause) String() string + type WhereClause struct + Value []Clause + func (w WhereClause) Create() string + func (w WhereClause) Finish(name string) string + func (w WhereClause) String() string