model

package
v0.0.0-...-b8fffe3 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Debug = false

Debug level logging

Functions

func Generate

func Generate(columnTypes map[string]map[string]string, columnsSorted []string, tableName string, structName string, pkgName string, jsonAnnotation bool, gormAnnotation bool, gureguTypes bool) ([]byte, error)

Generate Given a Column map with datatypes and a name structName, attempts to generate a struct definition

func GetAllMysqlTable

func GetAllMysqlTable(mariadbUser string, mariadbPassword string, mariadbAddr string, mariadbDatabase string) ([]string, error)

GetAllMysqlTable 获取数据库下面所有的表

func GetColumnsFromMysqlTable

func GetColumnsFromMysqlTable(addr string, mariadbDatabase string, mariadbTable string) (*map[string]map[string]string, []string, error)

GetColumnsFromMysqlTable Select column details from information schema and return map of map

func Init

func Init(cli *cli.Context) error

func ToCamelCase

func ToCamelCase(str string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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