Documentation ¶
Index ¶
- Constants
- Variables
- func GetDb(dbname string) (db *gorm.DB, mdb string, sdb, driver string)
- func ImportSql(sqlFile, dbName string) error
- func ParseDsn(dsn string) string
- func ParsePgsqlDsn(dsn string) string
- type GenColumnsService
- type GenTablesService
- func (e *GenTablesService) Create(m *models.GenTables) error
- func (s *GenTablesService) Del(req base.ReqIds) error
- func (e *GenTablesService) GenTableInit(dbname string, tableName string, force bool) (models.GenTables, error)
- func (e *GenTablesService) Get(tx *gorm.DB, exclude bool, tableId int) (models.GenTables, error)
- func (e *GenTablesService) GetDbs() []dto.DbOption
- func (e *GenTablesService) NOMethodsGen(tab models.GenTables, force bool) error
- func (s *GenTablesService) Page(req *dto.GenTablesGetPageReq, list *[]models.GenTables, total *int64) error
- func (e *GenTablesService) Update(tab *models.GenTables) (err error)
Constants ¶
View Source
const ROOT = "./modules/"
Variables ¶
View Source
var SerGenColumns = GenColumnsService{ base.NewService(consts.DbDefault), }
View Source
var SerGenTables = GenTablesService{ base.NewService(consts.DbDefault), }
Functions ¶
func ParsePgsqlDsn ¶
Types ¶
type GenColumnsService ¶
type GenColumnsService struct {
*base.BaseService
}
func (*GenColumnsService) GetList ¶
func (e *GenColumnsService) GetList(tx *gorm.DB, exclude bool, tableId int) ([]models.GenColumns, error)
type GenTablesService ¶
type GenTablesService struct {
*base.BaseService
}
func (*GenTablesService) GenTableInit ¶
func (*GenTablesService) GetDbs ¶
func (e *GenTablesService) GetDbs() []dto.DbOption
func (*GenTablesService) NOMethodsGen ¶
func (e *GenTablesService) NOMethodsGen(tab models.GenTables, force bool) error
func (*GenTablesService) Page ¶
func (s *GenTablesService) Page(req *dto.GenTablesGetPageReq, list *[]models.GenTables, total *int64) error
Click to show internal directories.
Click to hide internal directories.