Documentation
¶
Index ¶
- func Consume(line, prefix string) (bool, string)
- func EndsMultilineComment(line string) (bool, string)
- func IsComment(line string) bool
- func ParseIndexes(lines []string) (string, error)
- func StartsMultilineComment(line string) bool
- type ActiveFile
- type Column
- type Func
- type Index
- type Mixin
- type Mixinable
- type Package
- type Relationship
- type Subrecord
- type Table
- func (t Table) ColumnByName(colName string) (Column, bool)
- func (t *Table) Columns() []Column
- func (t Table) File() *ast.File
- func (t Table) HasRelationship(relate string) bool
- func (t Table) Name() string
- func (t *Table) PrimaryKeyColumn() Column
- func (t Table) RelationshipTo(tableName string) (Relationship, bool)
- func (t Table) Spec() *ast.TypeSpec
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EndsMultilineComment ¶
func ParseIndexes ¶
func StartsMultilineComment ¶
Types ¶
type ActiveFile ¶
func (ActiveFile) DefName ¶
func (af ActiveFile) DefName() string
type Column ¶
type Column struct {
GoType, Name string
Tag reflect.StructTag
Pkg *Package
MustNull bool
Array bool
Tbl *Table
IncludeName string
// contains filtered or unexported fields
}
func (*Column) IterateColumns ¶
func (Column) NonZeroCheck ¶
func (Column) SimpleType ¶
func (Column) Subcolumns ¶
type Package ¶
type Package struct { Tables []Table Mixins []Mixin Subrecords []Subrecord ActiveFiles []ActiveFile Funcs map[string][]Func // contains filtered or unexported fields }
func (*Package) OutputTemplates ¶
func (pkg *Package) OutputTemplates()
func (*Package) WriteLibraryFiles ¶
func (pkg *Package) WriteLibraryFiles()
func (*Package) WriteStarterFile ¶
func (pkg *Package) WriteStarterFile()
type Relationship ¶
type Relationship struct { Table string // One of "ParentHasMany", "ChildHasMany", "HasOne", "BelongsTo" Type string IsArray bool Alias string Parent Table ParentName, ChildName string OperativeColumn string }
func (Relationship) ColumnName ¶
func (r Relationship) ColumnName() string
func (Relationship) IsBelongsTo ¶
func (r Relationship) IsBelongsTo() bool
func (Relationship) IsChildHasMany ¶
func (r Relationship) IsChildHasMany() bool
func (Relationship) IsHasMany ¶
func (r Relationship) IsHasMany() bool
func (Relationship) IsHasOne ¶
func (r Relationship) IsHasOne() bool
func (Relationship) Name ¶
func (r Relationship) Name() string
type Subrecord ¶
type Subrecord struct {
// contains filtered or unexported fields
}
func (*Subrecord) AddRetrieved ¶
func (s *Subrecord) AddRetrieved()
type Table ¶
type Table struct { Pkg *Package Relations []Relationship Indexes []Index // contains filtered or unexported fields }
func (Table) HasRelationship ¶
func (*Table) PrimaryKeyColumn ¶
func (Table) RelationshipTo ¶
func (t Table) RelationshipTo(tableName string) (Relationship, bool)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.