feat(mysql): native SQL execution — fix #41 type decoding, in-process restore, .sql open-with (#42)

Fixes #41.

MySQL columns now decode by their declared type instead of a blind try_get chain,
so every non-string type (integers, DECIMAL, BIT, YEAR, DATE/TIME/DATETIME/TIMESTAMP)
renders its value instead of NULL. MySQL restore runs in-process over the sqlx driver
(no bundled MariaDB client, so MySQL 8 caching_sha2_password works) and the Clean toggle
is implemented. .sql files can be opened with Gridline from the OS file manager.

Verified: cargo test --lib 442 passed / 0 failed; bun run test 133 files / 1151 tests
exit 0; tsc clean; both live MySQL 8 integration tests pass with the bundled CLI hidden.
This commit is contained in:
2026-09-29 08:52:47 +08:00
committed by GitHub
parent ce4a73b0bb
commit 88e7e45818
36 changed files with 2265 additions and 141 deletions
+10
View File
@@ -8,4 +8,14 @@ describe("tauri bundle config (v0.8.1)", () => {
it("version is 0.8.1", () => {
expect(tauriConf.version).toBe("0.8.1");
});
it("declares a .sql file association with alternate rank", () => {
const assoc = tauriConf.bundle.fileAssociations;
expect(Array.isArray(assoc)).toBe(true);
const sql = (assoc as { ext?: string[]; rank?: string; role?: string }[])
.find((a) => a.ext?.includes("sql"));
expect(sql, "a .sql association must be declared").toBeDefined();
// Alternate: appear under "Open With" without hijacking the default handler.
expect(sql!.rank).toBe("Alternate");
expect(sql!.role).toBe("Editor");
});
});