generator

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetParams

func GetParams(cmds []string, i int) (string, error)

Types

type Attr

type Attr struct {
	StructField string
	Field       string
	Type        string
	Comment     string
}

type Generator

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

func NewGenerator

func NewGenerator(db *gosql.DB) *Generator

func (*Generator) Exec

func (g *Generator) Exec(query string) ([]map[string]interface{}, error)

func (*Generator) ShowStruct

func (g *Generator) ShowStruct(table string, tags []string) ([]byte, error)

func (*Generator) ShowTable

func (g *Generator) ShowTable(datas []map[string]interface{}, start time.Time)

type TableInfo

type TableInfo struct {
	Columns    []*Attr
	Len        int
	OtherTags  []string
	TagLen     int
	TableName  string
	ShortName  string
	StructName string
	Database   string
	PrimaryKey string
	ExistTime  bool
}

Jump to

Keyboard shortcuts

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