Documentation
¶
Index ¶
- func CheckCEDBVersion(dc *DBConfig) error
- func CheckCEDBVersionTableExists(dc *DBConfig) (bool, error)
- func CheckDBVersion(dc *DBConfig, tableName string, expectedVersion string) error
- func CheckTableExists(dc *DBConfig, tableName string) (bool, error)
- func CreateCEDBVersionTable(dc *DBConfig) error
- func CreateDatabase(dc *DBConfig) error
- func CreateDatabaseIfNotExists(dc *DBConfig) (bool, error)
- func DropDatabase(dc *DBConfig) error
- func DropDatabaseIfInitTablesFailed(dc *DBConfig, editionFunc EditionInitTablesFunc) error
- func ExecuteCEIssues(dc *DBConfig, curVersion string) error
- func ExecuteIssues(dc *DBConfig, curVersion string, rawSqlDir string) error
- func GetCEDBVersion(dc *DBConfig) (string, error)
- func GetDBVersion(dc *DBConfig, tableName string) (string, error)
- func GetSessionWithName(cfg config.Config) (*gorm.DB, error)
- func GetSessionWithoutName(cfg config.Config) (*gorm.DB, error)
- func InitCETables(dc *DBConfig) error
- func InitDBVersionTable(dc *DBConfig, rawSqlDir string) error
- func InitDefaultORGTables(dc *DBConfig, rawSqlDir string) error
- func InitORGTables(dc *DBConfig, rawSqlDir string) error
- func InitTables(dc *DBConfig, rawSqlDir string) error
- func InsertDBVersion(dc *DBConfig, tableName string, version string) error
- func LogDBName(databaseName string, format string, a ...any) string
- func ReadAndExecuteSqlFile(dc *DBConfig, sqlFile string) error
- type DBConfig
- type EditionInitTablesFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckCEDBVersion ¶
func CheckDBVersion ¶
func CreateCEDBVersionTable ¶
func CreateDatabase ¶
func DropDatabase ¶
func DropDatabaseIfInitTablesFailed ¶
func DropDatabaseIfInitTablesFailed(dc *DBConfig, editionFunc EditionInitTablesFunc) error
func ExecuteCEIssues ¶
func GetCEDBVersion ¶
func InitCETables ¶
func InitDBVersionTable ¶
func InitDefaultORGTables ¶
func InitORGTables ¶
func InitTables ¶
func ReadAndExecuteSqlFile ¶
Types ¶
type DBConfig ¶
func (*DBConfig) GetDatabaseName ¶
type EditionInitTablesFunc ¶
Click to show internal directories.
Click to hide internal directories.