Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ Rows are streamed without a CLI row limit or silent truncation. The agent's own

User data lives in `~/.sqlx/`. Use `--data-dir` or `SQLX_DATA_DIR` for another location. Saved connections use AES-256-GCM with an independently generated local key. Back up the key together with the encrypted data; losing the key prevents decryption. Device identity is generated locally, and this version does not upload device information.

The main executable contains no database drivers. MySQL and PostgreSQL use separate native Rust workers; Oracle and SQL Server use a separate JDBC worker. Downloaded resources are selected from the running CLI version's fixed GitHub Release manifest and verified before use. `--manifest <https-url>` selects a particular manifest or local test server.
The main executable contains no database drivers. MySQL and PostgreSQL use separate native Rust workers; Oracle and SQL Server use a separate JDBC worker. The JDBC worker keeps vendor driver logging off, so a failed connection reports only the SQLX error; set `SQLX_JDBC_DEBUG=1` to also see the driver's own diagnostics on stderr. Downloaded resources are selected from the running CLI version's fixed GitHub Release manifest and verified before use. `--manifest <https-url>` selects a particular manifest or local test server.

Downloads happen on first use and are cached afterwards. Each one prints `Downloading …`, a progress line with speed and estimated time, and a final `Downloaded … in 12.3s (390 KB/s)` line on stderr; the progress line is refreshed only when stderr is a terminal, so piped JSON stays clean. An interrupted transfer is retried up to three times, and re-running a failed command reuses every component that is already installed. To avoid waiting inside the first query or page, fetch components ahead of time:

Expand Down
14 changes: 14 additions & 0 deletions java/jdbc/src/main/java/ai/ottermind/sqlx/JdbcWorker.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
import java.nio.file.*;
import java.sql.*;
import java.util.*;
import java.util.logging.Level;
import java.util.logging.LogManager;
import java.util.logging.Logger;

public final class JdbcWorker {
private static final ObjectMapper JSON = new ObjectMapper();
Expand All @@ -17,7 +20,18 @@ public final class JdbcWorker {
}
private final PrintStream out;
JdbcWorker(PrintStream out) { this.out = out; }
/**
* Vendor drivers log connection diagnostics through java.util.logging, which floods
* stderr with dozens of lines when a connection fails. Keep it quiet unless
* SQLX_JDBC_DEBUG is set.
*/
private static void quietDriverLogging() {
if (System.getenv("SQLX_JDBC_DEBUG") != null) return;
LogManager.getLogManager().reset();
Logger.getLogger("").setLevel(Level.OFF);
}
public static void main(String[] args) {
quietDriverLogging();
JdbcWorker worker = new JdbcWorker(System.out);
try {
worker.emit("ready", "protocol_version", 1);
Expand Down
Loading