feat(gaussdb): support M-mode index metadata and DDL
This commit is contained in:
1 parent
ba0f864234
commit
5741bc1256
17 files changed
+667
-15
No files matched your search
@@ -20,6 +20,8 @@ pub use create_table::build_create_table_sql;
|
||||
pub use sqlite_rebuild::{apply_sqlite_table_structure_change, preview_sqlite_table_structure_change};
|
||||
pub use types::*;
|
||||
|
||||
use crate::models::connection::DatabaseType;
|
||||
|
||||
use columns::build_column_sql;
|
||||
use comments::build_table_comment_sql;
|
||||
use foreign_keys::build_foreign_key_sql;
|
||||
@@ -27,7 +29,12 @@ use indexes::build_index_sql;
|
||||
use triggers::build_trigger_sql;
|
||||
use validation::{validate_concurrent_index_scope, validate_draft};
|
||||
|
||||
pub fn build_table_structure_change_sql(options: TableStructureSqlOptions) -> TableStructureSqlResult {
|
||||
pub fn build_table_structure_change_sql(mut options: TableStructureSqlOptions) -> TableStructureSqlResult {
|
||||
// GaussDB M-mode uses MySQL-compatible SQL dialect with backtick quoting.
|
||||
// Map to StructureDialect::Mysql so DDL is generated correctly.
|
||||
if options.is_gaussdb_m_mode {
|
||||
options.database_type = Some(DatabaseType::Mysql);
|
||||
}
|
||||
// Fail closed: an unsupported concurrent-index request (existing index, or
|
||||
// partitioned parent table) must never degrade into blocking index DDL
|
||||
// behind the caller's back, so the whole plan is refused up front.
|
||||
|
||||
Reference in new issue
Block a user