core

package
v0.0.0-...-d14b600 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CustomerColumnDataType

func CustomerColumnDataType(dbColumnType string, customerType string, importStr string)

func FillDNS

func FillDNS(properties DbProperties) string

Types

type ColumnMetaData

type ColumnMetaData struct {
	Name       string
	FieldType  string
	GoType     string
	IsUnsigned bool
	IsNullable bool
	TableName  string
	OrmTagName string
	AddJsonTag bool
}

func NewColumnMetaData

func NewColumnMetaData(name string, isNullable bool, dataType string, isUnsigned bool, tableName string, ormTagName string, addJsonTag bool) *ColumnMetaData

func (ColumnMetaData) Tag

func (c ColumnMetaData) Tag() string

type ColumnMetaDataList

type ColumnMetaDataList []*ColumnMetaData

type DbProperties

type DbProperties struct {
	DBType   string
	Host     string
	Port     int
	UserName string
	PassWord string
	DbName   string
	Charset  string
}

type Generator

type Generator interface {
	// 创建
	NewMetaData(properties *Properties) (Generator, error)
	// 初始化连接
	ConnectionDB() error
	GetTableData() (TableMetaDataList, error)
}

type Properties

type Properties struct {
	DbProperties
	Debug           bool
	TableNameList   []string
	AddJsonTag      bool
	OrmTag          string
	OtherProperties []string
}

type TableMetaData

type TableMetaData struct {
	Name    string
	Columns ColumnMetaDataList
}

func (TableMetaData) ColumnsNameWithPrefixAndIgnoreColumn

func (t TableMetaData) ColumnsNameWithPrefixAndIgnoreColumn(col string, prefix string) string

func (TableMetaData) Imports

func (t TableMetaData) Imports() []string

type TableMetaDataList

type TableMetaDataList []*TableMetaData

Jump to

Keyboard shortcuts

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