mysql

package
v0.0.0-...-ae01125 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(conf config.MySQL) (*gorm.DB, error)

New 根据配置生成 MySQL 数据库实例

func NewGenerator

func NewGenerator(conf config.MySQL, gConf GeneratorConfig) (*gen.Generator, error)

NewGenerator 创建 Gorm 生成器

Types

type GeneratorConfig

type GeneratorConfig struct {
	QueryPath     string // dao 层方法生成路径
	QueryFilename string // 数据库层生成文件名
	ModelPath     string // 模型生成路径
}

GeneratorConfig 创建生成器配置

Jump to

Keyboard shortcuts

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