Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions internal/dms/biz/cloudbeaver.go
Original file line number Diff line number Diff line change
Expand Up @@ -1707,6 +1707,8 @@ func (cu *CloudbeaverUsecase) GenerateCloudbeaverConnectionParams(dbService *DBS
err = cu.fillHive4Params(config)
case constant.DBTypeDM:
err = cu.fillDMParams(config)
case constant.DBTypeGaussDB:
err = cu.fillGaussDBParams(config)

default:
return nil, fmt.Errorf("temporarily unsupported instance types")
Expand Down Expand Up @@ -1814,6 +1816,11 @@ func (cu *CloudbeaverUsecase) fillDMParams(config map[string]interface{}) error
return nil
}

func (cu *CloudbeaverUsecase) fillGaussDBParams(config map[string]interface{}) error {
config["driverId"] = "generic:gaussdb_jdbc"
return nil
}

func (cu *CloudbeaverUsecase) getGraphQLClientWithRootUser() (*cloudbeaver.Client, error) {
adminUser := cu.cloudbeaverCfg.AdminUser

Expand Down
4 changes: 4 additions & 0 deletions internal/dms/pkg/constant/const.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,9 @@ func ParseDBType(s string) (DBType, error) {
return DBTypeHive, nil
case "DM":
return DBTypeDM, nil
case "GaussDB for MySQL":
return DBTypeGaussDB, nil

default:
return "", fmt.Errorf("invalid db type: %s", s)
}
Expand All @@ -261,6 +264,7 @@ const (
DBTypeTBase DBType = "TBase"
DBTypeHive DBType = "Hive"
DBTypeDM DBType = "达梦(DM)"
DBTypeGaussDB DBType = "GaussDB / openGauss"
)

var SupportedDataExportDBTypes = map[DBType]struct{}{
Expand Down