Documentation
¶
Index ¶
- func Importer(_ context.Context, drv, dsn, schemaPath, daoPath *string, tables, _ []string) error
- func ImporterFromGoSchema(_ context.Context, dsn string, schemaPath, daoPath *string, ...) error
- func NewGormClient(drv, dsn string) (*gorm.DB, error)
- func NewRawSqlClient(sqlContent string) (*gorm.DB, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ImporterFromGoSchema ¶ added in v1.0.4
func ImporterFromGoSchema(_ context.Context, dsn string, schemaPath, daoPath *string, includeTables []string) error
ImporterFromGoSchema 从 gorm model 源码目录(dsn 形如 gorm://<dir>)生成 DAO:解析模型 → 还原 MySQL DDL → gorm.io/rawsql 内存库 → gorm gen。 模型文件只在目标不存在时补齐,绝不覆盖已有用户模型。
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.