[简体中文](README.md) · **English** # SQL **Inspect the schema, then answer questions with data.** [![npm](https://img.shields.io/npm/v/dsh-sql)](https://www.npmjs.com/package/dsh-sql) [![downloads](https://raw.githubusercontent.com/STARDUSTLC666/dsh-suite/npm-downloads/assets/dsh-sql-downloads.svg)](https://www.npmjs.com/package/dsh-sql) [![total downloads](https://raw.githubusercontent.com/STARDUSTLC666/dsh-suite/npm-downloads/assets/dsh-sql-total-downloads.svg)](https://www.npmjs.com/package/dsh-sql) **[Install](#install) · [Workflow](#start-using-it) · [Full guide](https://github.com/STARDUSTLC666/dsh-sql/blob/master/docs/REFERENCE.en.md)** Inspect the schema, then answer questions with data. · workflow illustration ## Features - Connect SQLite, MySQL or PostgreSQL. - Inspect schemas and summaries with row and time limits. - Review the database and SQL before writes, then verify by querying. ## Install Open **Plugins** in the DSH desktop app and install `dsh-sql`. If the CLI is available: ```bash dsh plugin --profile desktop add dsh-sql ``` For the web profile, replace `desktop` with `web`. Restart that DSH profile after installation. The package’s DSH requirement is `>=0.2.1-rc.3`. ## Start using it 1. Add your SQLite, MySQL or PostgreSQL connection in plugin settings and confirm the database. 2. Inspect the schema first, then query a small set of rows in read-only mode. 3. Specify filters and result limits; check columns, row counts and truncation. 4. Enable write access only when needed, review the SQL and connection before confirming, and query again to verify. Example request: > Inspect the database schema and answer with a read-only query, stating row limits and any truncation. ## Before you start Bring your own database connection and permissions. Write permissions and host approval are separate controls. Configuration, detailed tools and troubleshooting: [full reference](https://github.com/STARDUSTLC666/dsh-sql/blob/master/docs/REFERENCE.en.md). ## Plugin updates Check updates at the bottom of the workbench or native plugin details. Automatic checks are on by default; **automatic installation is off**. You choose whether to install and when to restart. Suite-managed components update with their bundle. [Update behavior](https://github.com/STARDUSTLC666/dsh-sql/blob/master/docs/REFERENCE.en.md). ## Documentation - [Full usage, configuration and limits](https://github.com/STARDUSTLC666/dsh-sql/blob/master/docs/REFERENCE.en.md) - [Release notes](https://github.com/STARDUSTLC666/dsh-sql/blob/master/CHANGELOG.md) - [Validation scope and history](https://github.com/STARDUSTLC666/dsh-sql/blob/master/docs/VALIDATION.md) ## Feedback and contributions If the plugin helps, a Star makes it easier for others to discover. Report problems or suggest improvements in [Issues](https://github.com/STARDUSTLC666/dsh-sql/issues); code and documentation [PRs](https://github.com/STARDUSTLC666/dsh-sql/pulls) are welcome. Include versions and reproduction steps, and remove credentials from reports. ## License [MIT](https://github.com/STARDUSTLC666/dsh-sql/blob/master/LICENSE)