2 files changed
+25
-2
No files matched your search
@@ -209,6 +209,14 @@ impl DdlDialectProfile {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn alter_modify_keyword(&self) -> &'static str {
|
||||
if self.database_type == DatabaseType::Dameng {
|
||||
"MODIFY"
|
||||
} else {
|
||||
"MODIFY COLUMN"
|
||||
}
|
||||
}
|
||||
|
||||
/// Replace `{key}` placeholders. Unknown keys are left unchanged.
|
||||
pub fn render_template(template: &str, vars: &[(&str, &str)]) -> String {
|
||||
let mut out = template.to_string();
|
||||
@@ -759,6 +767,12 @@ pub fn profile_for(db_type: DatabaseType) -> DdlDialectProfile {
|
||||
// MySQL family
|
||||
Mysql | Doris | StarRocks | Goldendb | Sundb | Databend | Gbase | ManticoreSearch => mysql_family(db_type),
|
||||
|
||||
Dameng => {
|
||||
let mut profile = oracle_family(db_type);
|
||||
profile.alter_uses_modify_column = true;
|
||||
profile
|
||||
}
|
||||
|
||||
// PostgreSQL family
|
||||
Postgres | Redshift | Gaussdb | Kingbase | Highgo | Vastbase | OpenGauss | Kwdb | Uxdb => {
|
||||
postgres_family(db_type)
|
||||
@@ -775,7 +789,7 @@ pub fn profile_for(db_type: DatabaseType) -> DdlDialectProfile {
|
||||
}
|
||||
|
||||
// Oracle family
|
||||
Oracle | Dameng | OceanbaseOracle | Yashandb | Xugu | Iris => oracle_family(db_type),
|
||||
Oracle | OceanbaseOracle | Yashandb | Xugu | Iris => oracle_family(db_type),
|
||||
|
||||
// SQL Server (not Access)
|
||||
SqlServer => sqlserver_family(db_type),
|
||||
|
||||
Reference in new issue
Block a user