Format SQL Code.
- This Visual Studio Code extension uses python-sqlparse for sql formatting.
- Inspired by SqlBeautifier for Sublime Text.
- Python (Recommend: Python version >= 3.4)
sqlparse for Visual Studio Code - Visual Studio Marketplace
"sqlparse.identifierCase": "Unchanged",
"sqlparse.indentTabs": false,
"sqlparse.indentWidth": 2,
"sqlparse.keywordCase": "Upper case",
"sqlparse.outputFormat": "SQL",
"sqlparse.pythonPath": "/usr/bin/python3",
"sqlparse.stripComments": false
- Use as an argument to the format() function. (python-sqlparse module)
- See the Formatting of SQL Statements for details.
# [python-sqlparse]
# @see **options
sqlparse.format(sql, encoding=None, **options)
"[sql]": {
"editor.defaultFormatter": "tinytamb.vscode-sqlparse",
"editor.formatOnSave": true
},
- For more information, see Visual Studio Code User and Workspace Settings
- python-sqlparse (New BSD license)
- python-shell (MIT)