25 MB lightweight cross-platform database client for 100+ databases, including MySQL, PostgreSQL, SQLite, Redis, MongoDB, DuckDB, SQL Server, and Dameng. Built-in AI, MCP Server, CLI, desktop and Docker. | 轻量级跨平台数据库管理工具,支持 MySQL、PostgreSQL、SQLite、Redis、MongoDB、达梦等 100+ 数据库,提供桌面端、Docker、CLI、内置 AI 助手和 MCP。
TypeScript aicliclickhousedatabasedatabase-clientdatabase-managementdockerguimcpmongodbmysqlpostgresqlredisrustsql-serversqlitetaurivue
fix(transfer): pin legacy batch caps in limit-dependent tests
t8y2ad425d66b1f0
diff --git a/crates/dbx-core/src/data/table_import.rs b/crates/dbx-core/src/data/table_import.rsindex 1e98460e17..10a95341ee 100644--- a/crates/dbx-core/src/data/table_import.rs+++ b/crates/dbx-core/src/data/table_import.rs@@ -13076,7 +13076,9 @@ mod tests {TableImportConflictPolicy::Error,&[],None,- None,+ // Pin the legacy 512 KiB cap so the two 300 KiB rows form separate+ // batches and the cancellation check lands between writes.+ Some(512 * 1024),&mut db_write_ms,&mut statement_count,)@@ -13698,9 +13700,26 @@ mod tests {effective_encoding: None,};- let batches =- build_import_insert_batches(&data, &mappings, &[], "events", "public", &DatabaseType::Postgres, 500)- .unwrap();+ let plan = CompiledImportPlan {+ mapped_source_indexes: vec![0],+ target_columns: vec!["payload".to_string()],+ column_types: vec![Some("text".to_string())],+ };+ // The default target now allows one large multi-row INSERT; pin the+ // legacy 512 KiB cap so row-count-based splitting keeps being exercised.+ let batches = build_import_insert_batches_with_plan(+ &data.rows,+ &plan,+ "events",+ "public",+ &DatabaseType::Postgres,+ false,+ TableImportConflictPolicy::Error,+ &[],+ None,+ Some(512 * 1024),+ )+ .unwrap();assert!(batches.len() > 1);assert_eq!(batches.iter().map(|batch| batch.row_count).sum::<usize>(), 4);diff --git a/crates/dbx-core/src/data/transfer.rs b/crates/dbx-core/src/data/transfer.rsindex 715a99c973..b45c6205a3 100644--- a/crates/dbx-core/src/data/transfer.rs+++ b/crates/dbx-core/src/data/transfer.rs@@ -18645,7 +18645,10 @@ SELECT 1 FROM dual"#"dbo",&DatabaseType::SqlServer,None,- SqlBatchLimits::for_database(&DatabaseType::SqlServer, rows.len()),+ // The default target now allows one large multi-row INSERT; pin the+ // legacy 512 KiB cap so the UTF-16 measurement keeps being exercised+ // across a split boundary.+ SqlBatchLimits::for_database(&DatabaseType::SqlServer, rows.len()).with_hard_sql_bytes(Some(512 * 1024)),).unwrap();