render

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompatibilityIndex

func CompatibilityIndex(table manifest.Table) string

func IsWritableColumn

func IsWritableColumn(column manifest.Column) bool

func Render

func Render(ctx context.Context, m *manifest.Manifest, outputFolder string, config Config) error

func Validate

func Validate(m *manifest.Manifest) error

Types

type Column

type Column struct {
	ColumnName     string
	IsUUID         bool
	IsIdentity     bool
	GoName         string
	JSONName       string
	IncludeJSONTag bool
	ResolvedGoType string
}

type Config

type Config struct {
	Dialect            string
	TemplateFS         fs.FS
	TemplateName       string
	SQLIdentifier      func(string) string
	SQLTableIdentifier func(catalog, schema, name string) string
}

type Data

type Data struct {
	Table   Table
	Index   string
	Imports []string
}

func BuildData

func BuildData(m *manifest.Manifest, table manifest.Table) (Data, error)

type Table

type Table struct {
	TableCatalog string
	TableSchema  string
	TableName    string
	TableType    string
	FileName     string
	PackageName  string
	GoName       string
	Columns      []Column
	WriteColumns []Column
}

Jump to

Keyboard shortcuts

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