Documentation
¶
Overview ¶
Package ddltogo A util can help to generate go struct by Create SQL DDL. Input: create sql; Output: golang struct.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Debug = false
Debug level logging
Functions ¶
func Generate ¶
func Generate(columnTypes []map[string]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 GetColumnsFromMysqlTable ¶
func GetColumnsFromMysqlTable(mariadbUser string, mariadbPassword string, mariadbHost string, mariadbPort int, mariadbDatabase string, mariadbTable string) (*map[string]map[string]string, error)
GetColumnsFromMysqlTable Select column details from information schema and return map of map
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.