dbmeta

package
v0.0.0-...-e3c8303 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2019 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Copy

func Copy(dst interface{}, src interface{}) error

func FmtFieldName

func FmtFieldName(s string) string

fmtFieldName formats a string as a struct key

Example:

fmtFieldName("foo_id")

Output: FooID

Types

type ModelInfo

type ModelInfo struct {
	PackageName     string
	StructName      string
	ShortStructName string
	TableName       string
	Fields          []string
}

func GenerateStruct

func GenerateStruct(db *sql.DB, tableName string, structName string, pkgName string, jsonAnnotation bool, gormAnnotation bool, gureguTypes bool) *ModelInfo

GenerateStruct generates a struct for the given table.

Jump to

Keyboard shortcuts

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