Repository navigation
feat(go): Oracle, MySQL/MariaDB, SQL Server, Redis and Cassandra drivers - #44
Merged
Merged
Conversation
Port the remaining drivers from src-tauri/src/drivers to Go, each in its own package under internal/drivers, and connect them in openSession. - Oracle on go-ora (pure Go): service, SID, TNS alias and descriptor connects, admin privileges, DBMS_OUTPUT notices, and a cancel that interrupts the running statement. tnsnames.ora discovery backs the oracle_tns_sources and oracle_tns_folder commands. - MySQL and MariaDB: go-sql-driver dials and authenticates, then the session speaks the protocol itself to keep column origins, status flags, warnings and "Rows matched", which the driver discards. - SQL Server on go-mssqldb: named instances, Windows authentication, TDS attention on cancel, and PRINT/RAISERROR as notices. - Redis and Valkey on go-redis with RESP3 replies parsed in order. - Cassandra on the Apache gocql driver. CI runs each driver's tests against the same containers as the Rust integration jobs. A SQLite test no longer fails when Windows keeps a just-closed database file locked. Refs #43
…vers First run of the Oracle integration tests against XE 21c and Free 23ai. - CLOB/NCLOB/BLOB columns were named LONG / LONG RAW, the types go-ora uses to fetch LOBs inline; map them back. - DBMS_OUTPUT returned nothing: one 32767-byte out bind fails when MAX_STRING_SIZE is STANDARD. Read it through 4000-byte binds. - Column defaults on servers without DATA_DEFAULT_VC (before 23ai) come from DATA_DEFAULT. - go-ora does not negotiate BOOLEAN, so 23ai sends 1/0. Columns read from a BOOLEAN table column are shown as TRUE/FALSE again, and edits write true/false literals. - Tests: expectations follow the types the server describes; the fetch cancel and stream queries no longer use SQL that 21c and 23ai reject. Refs #43
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 2 of the Go + Wails rewrite. Stacked on the phase 1 PR (
feat/go-wails-rewrite); review that one first.Ports the remaining drivers from
src-tauri/src/driversto Go, one package each underinternal/drivers, wired intoopenSession. Each implementsdrivers.Sessionlike the SQLite and PostgreSQL ports.sijms/go-ora/v2(pure Go)oracle_tns_sources/oracle_tns_folderporttns.rs(TNS_ADMIN, ORACLE_HOME, registry, PATH, IFILE, default domain).go-sql-driver/mysqlKILL QUERY.microsoft/go-mssqldbredis/go-redis/v9CLIENT UNBLOCK.apache/cassandra-gocql-driver/v2USEreconnects with the keyspace (gocql refusesUSE).Known differences from the Rust drivers
JSONcolumns fail (go-ora cannot decode them).INTERVAL DAY TO SECONDkeeps microseconds.TestReadsDriverStatefails if an upgrade renames it.verify-full: uses the system roots only. Rust also bundled webpki roots.Testing
Unit tests that need no server, including fake RESP and MySQL servers that cover handshakes, cancel and edits:
Integration tests: they mirror the Rust ones, plus the view and DDL fixtures for each dialect. They skip without
LQ_<ENGINE>_*. CI now runs them in the existing Oracle, MySQL/MariaDB, SQL Server, Redis/Valkey and Cassandra jobs. This PR is their first run against real servers.In the app:
test_connectionfor every new engine reaches its driver and fails fast with aconnectionerror on a closed port. The TNS commands answer, and SQLite and PostgreSQL still pass.Closes #43