generator

package
v0.0.0-...-f013270 Latest Latest
Warning

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

Go to latest
Published: May 27, 2017 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ColumnDefForMySQL

func ColumnDefForMySQL(opt Option, field meta.Field) string

func ColumnDefForPostgres

func ColumnDefForPostgres(opt Option, field meta.Field) string

func Generate

func Generate(opt Option) error

func IndexDefForMySQL

func IndexDefForMySQL(index meta.Index) string

func IndexDefForPostgres

func IndexDefForPostgres(table string, index meta.Index) string

func PartitionLinesForMySQL

func PartitionLinesForMySQL(partition meta.Partition) []string

Types

type Lines

type Lines []string

func (Lines) MaxIdx

func (this Lines) MaxIdx() int

type Option

type Option struct {
	Input               string
	Package             string
	OutputDir           string
	ExportTableFile     bool
	DefaultDB           string
	DefaultEngine       string
	DefaultStringLength int
}

func (*Option) PackageName

func (this *Option) PackageName() string

type Table

type Table struct {
	*meta.Object
	// contains filtered or unexported fields
}

func (*Table) DefLines

func (this *Table) DefLines() Lines

func (*Table) ExtraLines

func (this *Table) ExtraLines() []string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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