Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

fix(sql-review): enable sql review for snowflake and oceanbase in sql editor (#6732)

h3n4l8819b0b78c8c
diff --git a/backend/api/v1/sql_service.go b/backend/api/v1/sql_service.go
index 53b439a261..95a61939b4 100644
--- a/backend/api/v1/sql_service.go
+++ b/backend/api/v1/sql_service.go
@@ -1551,14 +1551,15 @@ func convertToParserEngine(engine db.Type) parser.EngineType {
// IsSQLReviewSupported checks the engine type if SQL review supports it.
func IsSQLReviewSupported(dbType db.Type) bool {
- if dbType == db.Postgres || dbType == db.MySQL || dbType == db.TiDB || dbType == db.MariaDB || dbType == db.Oracle {
+ switch dbType {
+ case db.Postgres, db.MySQL, db.TiDB, db.MariaDB, db.Oracle, db.OceanBase, db.Snowflake:
advisorDB, err := advisorDB.ConvertToAdvisorDBType(string(dbType))
if err != nil {
return false
}
return advisor.IsSQLReviewSupported(advisorDB)
+ default:
+ return false
}
-
- return false
}