Skip to content

Go + Wails phase 3: connection importers, data transfer, MCP server and AI setup - #46

Merged
FabioHAraujo merged 8 commits into
mainfrom
feat/go-wails-phase3
Dec 4, 2026
Merged

FabioHAraujo merged 8 commits into
mainfrom
feat/go-wails-phase3

Conversation

@FabioHAraujo

Copy link
Copy Markdown
Contributor

Closes #45. Stacked on #44 (phase 2).

What changes

The Go backend now handles every command the interface sends. The ones added here:

  • Connection importers (internal/importers): DBeaver (credentials decrypted with the standard library), DataGrip, pgAdmin (read through the existing SQLite driver, with the locked-database retry) and SQL Developer. Passwords go straight to the OS credential store.
  • Data transfer (internal/transfer):
    • Exports to SQL, CSV, CSV-Excel and JSON.
    • Imports from CSV and JSON, with preview and type inference.
    • Progress is sent as transfer-progress events.
    • Cancel stops the job's context and the query on the server. A cancelled import rolls back and restores autocommit.
  • MCP server (internal/mcp): LowQuery mcp speaks MCP over stdio, with the same eight tools, access levels, read-only guard, limits, cancellation and activity log as the Rust server.
  • AI setup (internal/aisetup): client detection and connecting a client to lowquery mcp. internal/ojson keeps the key order of other programs' configuration files when it rewrites them.
  • Refactors:
    • Engine dispatch moved to internal/engines, so the MCP server can open sessions without the app.
    • profiles.ConfigDir() replaces main.go's own copy.
    • The app gets an event emitter.
    • The Cassandra driver exports CQLLiteral and the Redis driver exports SplitArgs, so transfer and MCP do not keep copies of them.

Differences from the Rust behavior

  • A transfer stopped by cancel reports "Cancelled.", not the driver's message, so the interface shows its own cancel text.
  • Error details that came from serde or Rust's io now use Go's wording.
  • On Windows the SQLite read-only URI is file:C:/..., because the ncruces VFS rejects file:///C:/....

Tests

  • New Go tests:
    • Importers: 34, all of the Rust tests plus new ones.
    • AI setup: 4.
    • Transfer: 34 unit tests, plus SQLite tests and round trips.
    • MCP: 60.
  • Run locally: SQLite and PostgreSQL, all passing.
  • Run in CI: each database job now also runs ./internal/transfer/... and ./internal/mcp/... against its own server.
  • Windows GUI build: the Windows job now runs the release binary as LowQuery.exe mcp, sends it MCP messages over stdin and checks it replies.
  • Tested in the running app over CDP:
    • import_detect and import_preview read the DBeaver and pgAdmin files on a real machine.
    • ai_setup listed seven clients and ai_activity returned its entries.
    • On SQLite, 3,000 rows were exported to SQL and CSV, previewed, and imported back with the same sum, and the progress events reached the page.

@FabioHAraujo
FabioHAraujo changed the base branch from feat/go-wails-phase2 to main December 4, 2026 23:52
@FabioHAraujo
FabioHAraujo marked this pull request as ready for review December 4, 2026 23:52
@FabioHAraujo
FabioHAraujo merged commit 360aff5 into main Dec 4, 2026
39 of 40 checks passed
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.

Go + Wails phase 3: connection importers, data transfer, MCP server and AI setup

1 participant