fix(gbase8s): stabilize connections and table access

Co-authored-by: zipg <4047349+zipg@users.noreply.github.com>
This commit is contained in:
zipgandzipg authored and GitHub committed 2026-08-04 09:55:36 +08:00
1 parent 7d5a9459e4
commit 7e6923d53b
26 files changed
+375 -46

No files matched your search

+34
View File
@@ -4831,6 +4831,40 @@ mod tests {
.all(|statement| statement.contains("`gc`.`docfileinfo`") && !statement.contains('"')));
}
#[test]
fn gbase8s_save_keeps_unquoted_owner_when_driver_reports_no_identifier_quote() {
let result = prepare_data_grid_save(DataGridSaveStatementOptions {
database_type: Some(DatabaseType::Informix),
identifier_quote: Some(String::new()),
table_meta: DataGridTableMeta {
catalog: None,
database: Some("dbx_test".to_string()),
schema: Some("gbasedbt".to_string()),
table_name: "connection_smoke".to_string(),
primary_keys: vec!["id".to_string()],
columns: Some(vec![column("id", "integer", false, None), column("product", "varchar", false, None)]),
},
columns: vec!["id".to_string(), "product".to_string()],
source_columns: None,
rows: vec![vec![json!(1), json!("GBase 8s")]],
dirty_rows: vec![(0, vec![(1, json!("GBase 8s updated"))])],
deleted_rows: vec![],
new_rows: vec![],
});
assert_eq!(result.validation_error, None);
assert_eq!(
result.statements,
vec!["UPDATE gbasedbt.connection_smoke SET product = 'GBase 8s updated' WHERE id = 1;"]
);
assert_eq!(
result.rollback_statements,
vec![
"UPDATE gbasedbt.connection_smoke SET product = 'GBase 8s' WHERE id = 1 AND product = 'GBase 8s updated';"
]
);
}
#[test]
fn gaussdb_jdbc_save_selectively_quotes_identifiers() {
let result = prepare_data_grid_save(DataGridSaveStatementOptions {