codegen

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Generator

type Generator struct {
	// contains filtered or unexported fields
}

Generator generates Go code from database schema

func New

func New(schema *introspect.Schema, outputDir, packageName string) *Generator

New creates a new Generator

func NewWithConfig

func NewWithConfig(schema *introspect.Schema, cfg *config.Config) *Generator

NewWithConfig creates a new Generator with configuration

func (*Generator) Generate

func (g *Generator) Generate() error

Generate generates all code files

type Relationship

type Relationship struct {
	MethodName  string
	FieldName   string
	TargetModel string
	TargetTable string
	IsOneToMany bool
	FKColumns   []string
}

Jump to

Keyboard shortcuts

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