Documentation
¶
Index ¶
- func CleanFiles(name string, dir string, schemaList *schema.SchemaList, prefix, suffix string) error
- func FetchInsertColumns(columns schema.SortedColumns) []*schema.Column
- func FetchTableInsertFieldsString(columns schema.SortedColumns) string
- func FetchTableInsertValuesString(columns schema.SortedColumns) string
- func FetchTablePrimaryKey(table *schema.Table) string
- func FetchTablePrimaryKeyName(table *schema.Table) string
- func FetchTableUpdateFieldsString(columns schema.SortedColumns) string
- func FetchUpdateColumns(columns schema.SortedColumns) []*schema.Column
- func GetChangedTables(schemaList *schema.SchemaList, tablesCache *cache.TablesCache, force bool) ([]*schema.Table, error)
- func IsInsertColumn(column *schema.Column) bool
- func IsSpecialColumn(column *schema.Column) bool
- func IsUpdateColumn(column *schema.Column) bool
- func ParseFileNameToModelName(fileName, prefix, suffix string) string
- func ParseFileToAST(fileBytes []byte) (*token.FileSet, *ast.File, error)
- func ParseFileToGoStruct(filePath string) (*lib.GoStruct, error)
- func ParseStringToGoStruct(src []byte) (*lib.GoStruct, error)
- func ResolveTableToModel(modelNode *lib.GoStruct, table *schema.Table)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanFiles ¶
func CleanFiles(name string, dir string, schemaList *schema.SchemaList, prefix, suffix string) error
CleanFiles removes model files that are not found in the database.Tables map
func FetchInsertColumns ¶
func FetchInsertColumns(columns schema.SortedColumns) []*schema.Column
func FetchTableInsertFieldsString ¶
func FetchTableInsertFieldsString(columns schema.SortedColumns) string
func FetchTableInsertValuesString ¶
func FetchTableInsertValuesString(columns schema.SortedColumns) string
func FetchTablePrimaryKey ¶
func FetchTableUpdateFieldsString ¶
func FetchTableUpdateFieldsString(columns schema.SortedColumns) string
func FetchUpdateColumns ¶
func FetchUpdateColumns(columns schema.SortedColumns) []*schema.Column
func GetChangedTables ¶
func GetChangedTables(schemaList *schema.SchemaList, tablesCache *cache.TablesCache, force bool) ([]*schema.Table, error)
GetChangedTables returns a slice of tables that have changed
func IsInsertColumn ¶
func IsSpecialColumn ¶
func IsUpdateColumn ¶
func ParseFileToAST ¶
ParseFileToAST takes a file path and parses the contents of that file into an AST representation
func ParseFileToGoStruct ¶
InspectFile inspects a file
func ParseStringToGoStruct ¶
buildModelNodeFromFile builds a node representation of a struct from a file
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.