Documentation ¶
Index ¶
- Variables
- func AllTables(dsn string) ([]string, error)
- func ConfigureAcronym(words []string)
- func CreateKeyMapCode(path string)
- func GetCreateTableFromDB(dsn, tableName string) (string, error)
- func ParseSqlToWrite(sql string, writer io.Writer, options ...Option) error
- type FindByPkCodes
- type KeyMapCode
- type KeyMapCodeCodes
- type ModelCodes
- type NullStyle
- type Option
- func WithCharset(charset string) Option
- func WithCollation(collation string) Option
- func WithColumnPrefix(p string) Option
- func WithForceTableName() Option
- func WithGormType() Option
- func WithJsonTag() Option
- func WithNoNullType() Option
- func WithNullStyle(s NullStyle) Option
- func WithPackage(pkg string) Option
- func WithTablePrefix(p string) Option
Constants ¶
This section is empty.
Variables ¶
View Source
var ( KeyMapTmplRaw string KeyMapTmpl *template.Template KeyMapTmplFileRaw string KeyMapFileTmpl *template.Template )
View Source
var ( FindByIdTmplRaw string FindPkTmpl *template.Template )
Functions ¶
func ConfigureAcronym ¶
func ConfigureAcronym(words []string)
func CreateKeyMapCode ¶
func CreateKeyMapCode(path string)
func GetCreateTableFromDB ¶
Types ¶
type FindByPkCodes ¶
type KeyMapCode ¶
type KeyMapCodeCodes ¶
type ModelCodes ¶
type ModelCodes struct { Package string ImportPath []string StructCode []string EmunData []string Pkcode []string }
func ParseSqlFromDB ¶
func ParseSqlFromDB(dsn, tableName string, options ...Option) (ModelCodes, error)
type Option ¶
type Option func(*options)
func WithCharset ¶
func WithCollation ¶
func WithColumnPrefix ¶
func WithForceTableName ¶
func WithForceTableName() Option
func WithJsonTag ¶
func WithJsonTag() Option
func WithNoNullType ¶
func WithNoNullType() Option
func WithNullStyle ¶
func WithPackage ¶
func WithTablePrefix ¶
Click to show internal directories.
Click to hide internal directories.