dao

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2020 License: BSD-2-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ColumnTemplate

type ColumnTemplate struct {
	Name      string
	DBName    string
	Type      string
	ParamType string

	Flag         string // dirty
	WithJsonFlag bool
}

type DaoTemplate

type DaoTemplate struct {
	PkgName  string
	MidName  string
	LongName string
}

func (*DaoTemplate) Gen

func (dt *DaoTemplate) Gen() ([]byte, error)

type MysqlDao

type MysqlDao struct {
	Table  string
	DSN    string
	DB     string
	Output io.Writer

	PkgName      string
	WithJsonFlag bool
}

func (*MysqlDao) Create

func (md *MysqlDao) Create() int

type Pkg

type Pkg struct {
	Name string
}

type Table

type Table struct {
	PkgName      string
	WithJsonFlag bool
	// contains filtered or unexported fields
}

func (*Table) Create

func (table *Table) Create() error

type TableTemplate

type TableTemplate struct {
	TableName      string
	TableNameLower string
	DBTableName    string
	FuncParamName  string

	Flag string

	Pkgs    map[string]Pkg
	Columns []ColumnTemplate

	PkgName      string
	WithJsonFlag bool
}

func NewTableTemplate

func NewTableTemplate(table *Table) *TableTemplate

func (*TableTemplate) Gen

func (tt *TableTemplate) Gen() ([]byte, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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