Add db-query relocate cuse add db-query tool - #5
Conversation
* Add db-query CLI with read-only queries for Oracle, Postgres, MySQL, SQLite, BigQuery, and MongoDB plus MCP server * Move cuse under cmd/cuse as an independent module and update release workflow paths Co-authored-by: Cursor <cursoragent@cursor.com>
PR Summary by QodoOrganize cmd/ CLIs: move cuse module and add db-query (plus MCP server)
AI Description
Diagram
High-Level Assessment
Files changed (35)
|
Code Review by Qodo
1.
|
* Convert db-query tests to hydronica/trial tables and symbol-based names per go-testing.mdc * Merge QueryOptions and QueryOutput into runner.go per go-project-structure Co-authored-by: Cursor <cursoragent@cursor.com>
* Require Postgres sslrootcert for ssl_skip_hostname_verify and verify the certificate chain against the configured CA * Enforce SQLite read-only mode on all connection strings and honor cancellation during SQL connect * Expand read-only query validation to reject SELECT INTO, write keywords, and locking clauses Co-authored-by: Cursor <cursoragent@cursor.com>
Put examples in readme or allow the ability to generate examples via the cli or mcp tool
Removed detailed example configurations for various databases, including Oracle, Postgres, BigQuery, and MongoDB. Updated sections on backend-specific notes and authentication methods.
jbsmith7741
left a comment
There was a problem hiding this comment.
- Address the comments listed.
- Can we combine the mcp and cli tools into a single binary with a flag or something that can be used to toggle between the two purposes?
- In order for this tool to be useful for this repo we would need an associated skill that can be used to query DBs that are define and help with setup connections to Databases.
- If this is the case then would we want this installed as part of the default install.sh script?
- Make sure to go through ALL the code to try and reduce the amount of code generated, making a more concise tool.
| cache-dependency-path: cuse/go.sum | ||
| go-version-file: cmd/cuse/go.mod | ||
| cache-dependency-path: cmd/cuse/go.sum | ||
| - uses: goreleaser/goreleaser-action@v6 |
There was a problem hiding this comment.
Do we add the db-query binary to the release files so they can be downloaded and run without needing go?
…build * Replace monolithic Database struct with DatabaseConfig interface and per-type configs supporting custom TOML unmarshaling and DSN builders * Move read-only query validation into the runner layer so all consumers (CLI and MCP) share enforcement * Consolidate per-app Makefiles into a single root Makefile building all targets to scripts/ * Tighten README, remove nested .gitignore, and fix cuse test isolation for firefoxInstallPaths Co-authored-by: Cursor <cursoragent@cursor.com>
e8085e0 to
c486063
Compare
* Replace stdlib flag package with go-config flag and comment struct tags on Config * Remove Disable(OptFlag) so go-config handles flags, config file, and env uniformly Co-authored-by: Cursor <cursoragent@cursor.com>
* Add -mcp flag that starts the stdio JSON-RPC server in-process, eliminating the subprocess hop * Delete separate db-query-mcp binary and mcpcli exec wrapper Co-authored-by: Cursor <cursoragent@cursor.com>
* Append db-query archives to the same tagged GitHub release as cuse * Build with go -C into GOBIN and drop the Firefox install-path hook
* List tables, views, or collections and columns via -list-schema and MCP list_schema * Keep list-collections as a deprecated alias and rename config methods to Name and Type
* Rename engine configs and Database interface; store entry key in ID with TOML name unchanged. * Drop BigQuery BQProject, BQDataset, and BQAuth alias fields normalization.
Quality check
Summary
Organizes CLI applications under
cmd/and adds a new database query tool.cuse: Movecusetocmd/cuseas an independent Go module and update the release workflow paths accordingly.db-query: New CLI for read-only queries against Oracle, Postgres, MySQL, SQLite, BigQuery, and MongoDB, with JSON/table output and a companion MCP server (db-query-mcp).cmd/db-query/README.md, config/SQL/Mongo unit tests, and an example TOML config.