table

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2023 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilterTables

func FilterTables(tables []string) []string

func NameIsMatch

func NameIsMatch(table string) bool

Types

type Field

type Field struct {
	IsPK               bool   `json:"is_pk"`
	Name               string `json:"name"`
	UpperCamelCaseName string `json:"upper_camel_case_name"`
	Type               string `json:"type"`
	Comment            string `json:"comment"`
	DefaultValue       string `json:"default_value"`
	Tag                string `json:"tag"`
}

type Table

type Table struct {
	Package            string  `sql:"package"`
	Name               string  `sql:"name"`
	UpperCamelCaseName string  `sql:"upper_camel_case_name"`
	Comment            string  `sql:"comment"`
	Fields             []Field `sql:"fields"`
	ContainsTimeField  bool    `sql:"contains_time"`
}

func (*Table) GenerateCode

func (t *Table) GenerateCode() string

func (*Table) GenerateFile

func (t *Table) GenerateFile() error

Jump to

Keyboard shortcuts

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