generator

package
v0.0.36 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2021 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FuncInfo

type FuncInfo struct {
	rdesc.FuncDesc
	Repo     *repo
	Name     string
	Template string
}

type Generator

type Generator struct {
	Info *defines.Info
	// contains filtered or unexported fields
}

func New

func New(dialectName constants.DIALECT, log logger.GpaLogger) (*Generator, error)

func (*Generator) Generate

func (g *Generator) Generate(pkgTag interface{}, forceRegenerate bool) error

Generate 生成数据持久化代码 @pkgTag 字符串 数据库操作接口定义所在包路径

   reflect.Type  任意数据库操作接口实例,例如 repos.Count 的实例,可以使用以下代码
			     reflect.TypeOf((*repos.Count)(nil)).Elem())

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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