😀格式化你杂乱无章的sql/hql代码😀
VS Code extension that beautifies SQL(HQL).
一键美化你的SQL!请确保你使用的语言是SQL
,选择需要优化的代码块,按下Alt+Shift+f
即可使用!
Beautify your SQL! Make sure the language is set to SQL
,then select your sql code and press Alt+Shift+f
just like you normally would.
一键美化你的DDL!请确保你使用的语言是SQL
,选择需要优化的代码块,按下Alt+Shift+l
即可使用!
Beautify your SQL DDL! Make sure the language is set to SQL
,then select your sql code and press Alt+Shift+l
.
一键从你的Insert语句中提取的DDL!请确保你使用的语言是SQL
,选择需要优化的代码块,按下Alt+Shift+;
即可使用!
Extract ddl from insert sql ! Make sure the language is set to SQL
,then select your sql code and press Alt+Shift+;
.
你可以在vscode中文件-首选项-设置-扩展中找到一些自定义内容。详细的说明,可以阅读wiki-功能说明!
Customize your own sql-beautify style in [settings-extension]. For more detail, please read wiki Features to get more details about features of this extension
-
这个插件在hql语句上更加兼容,因为它是我的主要工作语言。如果你在其他类型sql上使用,请小心使用,尤其是你的代码比较复杂的时候。This extension is more compatible in
Hive SQL
than in other sql language. If you develop on other sql language, it may cause some problems when the code is complex. -
请小心使用本插件,建议对代码一段段进行格式化,而不是对整个文件一次性进行格式化。 Please be careful when use this plugin. Do not use it for the whole file. Recommend using it on code blocks one by one.
-
如果你真的遇到什么问题了,请先
Ctrl+z
恢复你的代码,然后可以联系我修复可能存在的问题。If you have some problems, try to useCtrl+z
to recover your code and contact me to fix the bug if you wish.
- 感谢@fourgold新增了两个功能,在小写模式开启下:where后面and和on的对齐,以及注释的对齐
- Thanks for @fourgold to add new functions and let SQL Beuatify can order the comment and insert indents before 'and' and 'on'
- 再次修复了小写关键词设置下对某些字段名的错误小写
- Fixed some bugs when using lowercase keywords.
如果有任何问题,欢迎在Issues上留言提问题给我。也可以通过我的微信和我联系
If you have any problem,welcome to submit issues or You can contact me via wechat.