Skip to content

feat(transfer): implement data transfer feature - #51

Merged
Blankll merged 4 commits into
masterfrom
feat/transfer-component
Apr 23, 2026
Merged

feat(transfer): implement data transfer feature#51
Blankll merged 4 commits into
masterfrom
feat/transfer-component

Conversation

@Blankll

@Blankll Blankll commented Apr 16, 2026

Copy link
Copy Markdown
Member

This pull request introduces a new data transfer module to the Tauri backend, enabling advanced data import, export, and migration features across multiple database engines. It adds new command handlers for these operations, integrates them into the Tauri app, and provides utility modules for DDL generation and best-practice defaults. Additionally, it updates dependencies to support Excel and other file formats.

New Data Transfer Functionality:

  • Added a new transfer module with Tauri command handlers for data export, import, and migration, supporting preview and execution for all major database engines (Postgres, MySQL, SQLServer, SQLite). Also includes file format detection and automatic column mapping for migrations. (src-tauri/src/commands/transfer.rs, src-tauri/src/commands/transfer.rsR1-R299)
  • Registered the new transfer commands in the Tauri application so they are available to the frontend. (src-tauri/src/lib.rs, src-tauri/src/lib.rsR129-R133)

Transfer Utilities and Defaults:

  • Added a DDL generation utility for all supported database engines, supporting options like including drop statements, primary keys, and comments. (src-tauri/src/transfer/ddl.rs, src-tauri/src/transfer/ddl.rsR1-R358)
  • Provided best-practice default configurations for CSV, JSONL, SQL, and Excel data transfer formats. (src-tauri/src/transfer/defaults.rs, src-tauri/src/transfer/defaults.rsR1-R47)

Dependency Updates:

  • Added new dependencies to Cargo.toml for Excel support (rust_xlsxwriter, calamine) and hex encoding. (src-tauri/Cargo.toml, src-tauri/Cargo.tomlR64-R66)

Project Structure:

  • Re-exported the new transfer commands in the main command module and cleaned up module-level comments. (src-tauri/src/commands/mod.rs, [1] [2]
  • Exposed the new transfer module at the crate root. (src-tauri/src/lib.rs, src-tauri/src/lib.rsL1-R2)

Blankll added 4 commits April 16, 2026 22:41
Add Transfer page with 4 tabs for cross-database operations:
- Export: CSV, JSONL, Excel, SQL format export with progress tracking
- Import: CSV, JSONL, Excel, SQL format import with validation
- Structure: DDL generation and SQL file execution for PostgreSQL,
  MySQL, SQLite, SQL Server
- Migration: Cross-engine data migration with type mapping preview
Backend:
- Add src-tauri/src/transfer/ module (export, import, ddl, migration)
- Add Tauri commands for all transfer operations
- Add hex, rust_xlsxwriter, calamine crates for format support
Frontend:
- Add TransferPage.vue with tab-based wizard interface
- Add transfer/ components for each operation type
- Add transferStore, transferApi, transfer types
- Update router and sidebar navigation
- Add ColumnInfo type to connection.ts
- Add i18n keys for all Transfer UI
- Add Excel (.xlsx) export/import with options (sheet name, headers, freeze, auto-fit)
- Add SQL export with options (batch size, CREATE/DROP TABLE statements)
- Redesign TransferStepCard header to compact 'STEP 01 SOURCE' format
- Simplify ExportWizard to 2 steps (Source + Format & Output)
- Replace RadioGroup with native radio for compact format selector row
- Fix Checkbox component missing checkmark indicator (add inline SVG)
- Add i18n keys for 'Format & Output' step title
Tabs persisted across sessions were not being closed when switching
connections from ConnectionsPage. The previous approach relied on
watch ordering, but connectionStore.connect() sets activeConnectionId
before navigation, causing the fallback check to be a no-op.
- Add connectionId field to QueryTab to track origin connection
- Add reconcileTabsForConnection() to close/orphan mismatched tabs
- Handle legacy tabs without connectionId (treat as stale)
- Fix HistoryPage createTab() argument order bug
- Remove reliance on activeConnectionId timing
@Blankll
Blankll marked this pull request as ready for review April 23, 2026 15:03
@Blankll
Blankll merged commit 78ef65a into master Apr 23, 2026
0 of 3 checks passed
@Blankll
Blankll deleted the feat/transfer-component branch April 23, 2026 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant