dbgen

package
v0.0.0-...-225f367 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateFromDDL

func GenerateFromDDL(filename string, database string, outputDir string, withCache bool) error

GenerateFromDDL generate model CURD code from ddl.

func NewCommand

func NewCommand() *cli.Command

NewCommand creates a dbgen command.

func WriteFormatedGoFile

func WriteFormatedGoFile(name string, data []byte, perm fs.FileMode) error

Types

type Table

type Table struct {
	*parser.Table
	PkgName string
	Imports []string
}

func (*Table) TableCamleName

func (t *Table) TableCamleName() string

func (*Table) TableUntitleCamleName

func (t *Table) TableUntitleCamleName() string

func (*Table) Validate

func (t *Table) Validate() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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