Documentation ¶
Index ¶
- Variables
- func CamelCaseString(s string) string
- func CreateTableStructString(settings *settings.Settings, db database.Database, table *database.Table) (string, string, error)
- func FormatColumnName(settings *settings.Settings, column, table string) (string, error)
- func FormatTableName(settings *settings.Settings, table *database.Table) string
- func GenerateImports(content *strings.Builder, settings *settings.Settings, columnInfo ColumnInfo)
- func GetNullType(settings *settings.Settings, primitive string, sql string) string
- func IndexCaseInsensitive(s, substr string) int
- func ReplaceSpace(r rune) rune
- func ToInitialisms(s string) string
- func ValidVariableName(s string) bool
- type ColumnInfo
- type TableContentMap
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func CamelCaseString ¶
func CreateTableStructString ¶
func FormatColumnName ¶
FormatColumnName checks for invalid characters and transforms a column name according to the provided settings.
func FormatTableName ¶
func GenerateImports ¶
func GenerateImports(content *strings.Builder, settings *settings.Settings, columnInfo ColumnInfo)
func GetNullType ¶
func IndexCaseInsensitive ¶
func ReplaceSpace ¶
ReplaceSpace swaps any Unicode space characters for underscores to create valid Go identifiers
func ToInitialisms ¶
func ValidVariableName ¶
ValidVariableName checks for the existence of any characters outside of Unicode letters, numbers and underscore.
Types ¶
type ColumnInfo ¶
type ColumnInfo struct {
// contains filtered or unexported fields
}
func MapDbColumnTypeToGoType ¶
type TableContentMap ¶
func NewTableContentMap ¶
func NewTableContentMap() TableContentMap
func (*TableContentMap) ProcessTables ¶
Click to show internal directories.
Click to hide internal directories.