dsh-sql-format

by uckkk

0 工具与能力github未核验到 manifest收录于 08-16

SQL 格式化:子句换行、关键字大写

安装

dsh plugin --profile web add github:uckkk/dsh-sql-format

GitHub 源码安装:首次需按提示配置 allowBuilds 构建授权后重试

安装与环境配置指引、插件开发教程见 DSH 中文社区文档 ↗

安装即在你的机器上以你的权限运行第三方代码——它可读写文件、使用凭据、访问网络,DSH 的工具审批不会为插件代码加沙箱。「检测到 manifest」仅代表发现 dsh.bundle / dsh.plugin 清单,不构成兼容性或安全审查;安装前请审阅源码,不熟悉的插件先在不含密钥的环境试用。

README

目录

SQL 子句换行、关键字大写,提升可读性。纯 Node 实现(不解析语义)。

提供的工具

工具 作用
format_sql SQL 格式化

安装

dsh plugin add dsh-sql-format

安装后在 profile 的 package.json 的 dsh.profile.bundles 中加入 "dsh-sql-format"。

用法示例

格式化这条 SQL
→ 调用 format_sql(sql="select * from users where age > 18 order by id desc")

安装

dsh plugin add github:uckkk/dsh-sql-format

安装即在本机运行第三方代码,请自行审阅源码。

安装

dsh plugin add github:uckkk/dsh-sql-format

使用

安装后在会话中调用该插件注册的工具即可。

许可

MIT

安装即在本机运行第三方代码,请自行审阅源码。

原始 README: https://github.com/uckkk/dsh-sql-format/blob/main/README.md ↗