genutil

package
v1.8.97 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

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 FetchTablePrimaryKey(table *schema.Table) string

func FetchTablePrimaryKeyName

func FetchTablePrimaryKeyName(table *schema.Table) string

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 IsInsertColumn(column *schema.Column) bool

func IsSpecialColumn

func IsSpecialColumn(column *schema.Column) bool

func IsUpdateColumn

func IsUpdateColumn(column *schema.Column) bool

func ParseFileNameToModelName

func ParseFileNameToModelName(fileName, prefix, suffix string) string

func ParseFileToAST

func ParseFileToAST(fileBytes []byte) (*token.FileSet, *ast.File, error)

ParseFileToAST takes a file path and parses the contents of that file into an AST representation

func ParseFileToGoStruct

func ParseFileToGoStruct(filePath string) (*lib.GoStruct, error)

InspectFile inspects a file

func ParseStringToGoStruct

func ParseStringToGoStruct(src []byte) (*lib.GoStruct, error)

buildModelNodeFromFile builds a node representation of a struct from a file

func ResolveTableToModel

func ResolveTableToModel(modelNode *lib.GoStruct, table *schema.Table)

Deprecated

Types

This section is empty.

Jump to

Keyboard shortcuts

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