In the DeepSeek Harness (DSH) development workflow, handling raw SQL strings directly often lacks a unified formatting standard. The dsh-sql-format plugin focuses on improving the readability of SQL output, using formatting tools to convert messy SQL into clearly structured text with uppercase keywords.
Plugin Positioning¶
This plugin is maintained by user istone and is a client-side plugin. It does not involve database connections or semantic analysis; it only performs layout processing on SQL strings.
Core Functionality¶
The plugin provides the following capabilities:
- format_sql: Core tool used to perform SQL formatting.
- SQL clause line breaks: Splits long SQL statements into multiple lines to improve visual readability.
- Uppercase keywords: Standardizes the case of SQL keywords to make them easier to recognize.
Installation and Enablement¶
After installing the plugin, you need to declare it as enabled in the project configuration file.
- Run the installation command:
dsh plugin add github:uckkk/dsh-sql-format
- Open the profile
package.jsonfile. - Add
"dsh-sql-format"to thedsh.profile.bundlesconfiguration entry.
Typical Usage¶
After installing and loading the plugin in a session, directly call the format_sql function and pass in the SQL string to be formatted.
Example:
format_sql(sql="select * from users where age > 18 order by id desc")
Notes¶
- Pure Node implementation: The plugin does not parse SQL semantics or grammatical logic; it only performs string layout.
- Code execution privileges: Installation means running third-party code on your local machine. Be sure to review the source code and license before installing.